Skip to content

Commit

Permalink
fix: rerender select component if label changed (#2880)
Browse files Browse the repository at this point in the history
  • Loading branch information
bytemain authored Jul 12, 2023
1 parent 5fe93e5 commit 1361d0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/preferences/src/browser/preferenceItem.view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ function SelectPreferenceItem({
</Option>
);
});
}, [schema.enum]);
}, [schema.enum, labels]);

const renderNoneOptions = () => (
<Option
Expand Down
6 changes: 2 additions & 4 deletions packages/preferences/src/browser/preferences.view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@ const usePreferenceGroups = () => {
const dispose = preferenceService.onSettingsGroupsChange(() => {
updateGroup.run();
});
updateGroup.run();

return () => {
dispose.dispose();
};
});

useEffect(() => {
updateGroup.run();
}, []);

useEffect(() => {
Expand Down

0 comments on commit 1361d0c

Please sign in to comment.