close all fix

This commit is contained in:
Jan Prochazka
2020-10-19 17:11:27 +02:00
parent 6792b652fb
commit 1a54d6bab0

View File

@@ -176,7 +176,14 @@ export default function TabsPanel() {
const closeTab = closeTabFunc((x, active) => x.tabid == active.tabid);
const closeAll = () => {
setOpenedTabs([]);
const closedTime = new Date().getTime();
setOpenedTabs((tabs) =>
tabs.map((tab) => ({
...tab,
closedTime: tab.closedTime || closedTime,
selected: false,
}))
);
};
const closeWithSameDb = closeTabFunc(
(x, active) =>