this repo has no description

recalculate tag button position on window resize

Changed files
+4 -1
packages
core-extensions
src
moonbase
+4 -1
packages/core-extensions/src/moonbase/ui/index.tsx
···
const ArrowsUpDownIcon =
spacepack.findByCode(ArrowsUpDownIconSVG)[0].exports.default;
+
const { WindowStore } = require("common_stores");
+
const windowSize = Flux.useStateFromStores([WindowStore], () => WindowStore.windowSize());
+
const tagsContainer = React.useRef<HTMLDivElement>(null);
const tagListInner = React.useRef<HTMLDivElement>(null);
const [tagsButtonOffset, setTagsButtonOffset] = React.useState(0);
···
}
}
setTagsButtonOffset(offset);
-
}, []);
+
}, [windowSize]);
const [selectedTags, setSelectedTags] = React.useState(new Set<string>());
const toggleTag = (tag: string) => {