yangdx commited on
Commit
19f7e81
·
1 Parent(s): e7af850

Fix settings popover toggle logic

Browse files
lightrag_webui/src/components/graph/Settings.tsx CHANGED
@@ -199,17 +199,15 @@ export default function Settings() {
199
  const { t } = useTranslation();
200
 
201
  const saveSettings = () => setOpened(false);
202
- const toggleSettings = () => setOpened(!opened);
203
 
204
  return (
205
  <>
206
- <Popover open={opened}>
207
  <PopoverTrigger asChild>
208
  <Button
209
  variant={controlButtonVariant}
210
  tooltip={t('graphPanel.sideBar.settings.settings')}
211
  size="icon"
212
- onClick={toggleSettings}
213
  >
214
  <SettingsIcon />
215
  </Button>
 
199
  const { t } = useTranslation();
200
 
201
  const saveSettings = () => setOpened(false);
 
202
 
203
  return (
204
  <>
205
+ <Popover open={opened} onOpenChange={setOpened}>
206
  <PopoverTrigger asChild>
207
  <Button
208
  variant={controlButtonVariant}
209
  tooltip={t('graphPanel.sideBar.settings.settings')}
210
  size="icon"
 
211
  >
212
  <SettingsIcon />
213
  </Button>