fix: refresh bank list when dropdown is opened (#504)
Previously, the bank selector dropdown only loaded banks on initial page load, requiring a full page refresh to see newly created banks. Now calls loadBanks() each time the popover opens.
This commit is contained in:
parent
1e40cd22a6
commit
0ad8c2d09c
1 changed files with 7 additions and 1 deletions
|
|
@ -367,7 +367,13 @@ function BankSelectorInner() {
|
||||||
<div className="h-8 w-px bg-border" />
|
<div className="h-8 w-px bg-border" />
|
||||||
|
|
||||||
{/* Memory Bank Selector */}
|
{/* Memory Bank Selector */}
|
||||||
<Popover open={open} onOpenChange={setOpen}>
|
<Popover
|
||||||
|
open={open}
|
||||||
|
onOpenChange={(isOpen) => {
|
||||||
|
setOpen(isOpen);
|
||||||
|
if (isOpen) loadBanks();
|
||||||
|
}}
|
||||||
|
>
|
||||||
<PopoverTrigger asChild>
|
<PopoverTrigger asChild>
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue