Skip to content

Commit b7f27f9

Browse files
committed
- fix selected search item not updated
1 parent ea91118 commit b7f27f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/firefly/js/ui/SearchPanel.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ export class SearchPanel extends SimpleComponent {
2626
const sideBar = Object.keys(allSearchItems).length > 1 ? <SideBar {...{activeSearch, groups}}/> : null;
2727
const searchItem = allSearchItems[activeSearch];
2828

29-
const onTabSelect = () => undefined;
30-
3129
if (flow === 'vertical') {
3230
return (
3331
<div className='SearchPanel' style={style}>
@@ -41,10 +39,12 @@ export class SearchPanel extends SimpleComponent {
4139
);
4240
} else {
4341
const title = get(groups, [0, 'title']);
42+
const onTabSelect = (index,id,name) => dispatchUpdateAppData(set({}, ['searches', 'activeSearch'], name));
43+
4444
return (
4545
<div>
4646
{title && <h2 style={{textAlign: 'center'}}>{title}</h2>}
47-
<Tabs onTabSelect={onTabSelect} resizable={true} useFlex={true} borderless={true} contentStyle={{backgroundColor: 'transparent'}}>
47+
<Tabs componentKey={`SearchPanel_${title}`} onTabSelect={onTabSelect} resizable={true} useFlex={true} borderless={true} contentStyle={{backgroundColor: 'transparent'}}>
4848
{searchesAsTabs(allSearchItems)}
4949
</Tabs>
5050
</div>

0 commit comments

Comments
 (0)