From 6125a090efdf8c174d5911843b741ee567fd1a95 Mon Sep 17 00:00:00 2001 From: Deluan Date: Thu, 26 Jun 2025 23:51:54 -0400 Subject: [PATCH] fix: ensure LibrarySelector dropdown refreshes on button close Added refresh() call when closing the dropdown via button click to maintain consistency with the ClickAwayListener behavior. This ensures the UI updates properly regardless of how the dropdown is closed, fixing an inconsistent refresh behavior between different closing methods. The fix tracks the previous open state and calls refresh() only when the dropdown was open and is being closed by the button click. --- ui/src/common/LibrarySelector.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/src/common/LibrarySelector.jsx b/ui/src/common/LibrarySelector.jsx index 43df7c353..cb0ad0ca0 100644 --- a/ui/src/common/LibrarySelector.jsx +++ b/ui/src/common/LibrarySelector.jsx @@ -109,7 +109,12 @@ const LibrarySelector = () => { const handleToggle = (event) => { setAnchorEl(event.currentTarget) + const wasOpen = open setOpen(!open) + // Refresh data when closing the dropdown + if (wasOpen) { + refresh() + } } const handleClose = () => {