Remove ExtenedMap, ToggleSet, and observable versions (#3310)

- Switch to helper functions instead. They don't impact the prototype
  tree and it means that we don't need to introduce versions that are
  both observable and "normal"

- Tidy <ItemListLayout> and hiddenTableColumns to not need
  pre-initialization

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-02-16 18:20:22 -05:00
1 parent ed91ef2d03
commit 8088d3b5c2
10 files changed
+58 -105

No files matched your search

@@ -11,7 +11,7 @@ import { Notice } from "../+extensions/notice";
import { KubeconfigSyncEntry, KubeconfigSyncValue, UserStore } from "../../../common/user-store";
import { isWindows } from "../../../common/vars";
import logger from "../../../main/logger";
import { iter, multiSet } from "../../utils";
import { iter } from "../../utils";
import { SubTitle } from "../layout/sub-title";
import { PathPicker } from "../path-picker/path-picker";
import { Spinner } from "../spinner";
@@ -93,7 +93,9 @@ export class KubeconfigSyncs extends React.Component {
return Array.from(this.syncs.entries(), ([filePath, value]) => ({ filePath, ...value }));
}
onPick = async (filePaths: string[]) => multiSet(this.syncs, await getAllEntries(filePaths));
onPick = async (filePaths: string[]) => {
this.syncs.merge(await getAllEntries(filePaths));
};
getIconName(entry: Entry) {
switch (entry.info.type) {