Skip to content

Commit c473ce6

Browse files
authored
fix: Move settings button on data browser toolbar for better UI (#2940)
1 parent b92b70c commit c473ce6

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

src/dashboard/Data/Browser/BrowserToolbar.react.js

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,30 @@ const BrowserToolbar = ({
366366
</BrowserMenu>
367367
)}
368368
{onAddRow && <div className={styles.toolbarSeparator} />}
369+
<BrowserMenu setCurrent={setCurrent} title="Settings" icon="gear-solid">
370+
<BrowserMenu title="Info Panel" setCurrent={setCurrent}>
371+
<MenuItem
372+
text={
373+
<span>
374+
{scrollToTop && (
375+
<Icon
376+
name="check"
377+
width={12}
378+
height={12}
379+
fill="#ffffffff"
380+
className="menuCheck"
381+
/>
382+
)}
383+
Scroll to top
384+
</span>
385+
}
386+
onClick={() => {
387+
toggleScrollToTop();
388+
}}
389+
/>
390+
</BrowserMenu>
391+
</BrowserMenu>
392+
<div className={styles.toolbarSeparator} />
369393
<a className={classes.join(' ')} onClick={isPendingEditCloneRows ? null : onRefresh}>
370394
<Icon name="refresh-solid" width={14} height={14} />
371395
<span>Refresh</span>
@@ -445,30 +469,6 @@ const BrowserToolbar = ({
445469
<MenuItem text={'Cancel all pending rows'} onClick={onCancelPendingEditRows} />
446470
</BrowserMenu>
447471
)}
448-
<div className={styles.toolbarSeparator} />
449-
<BrowserMenu setCurrent={setCurrent} title="Settings" icon="gear-solid">
450-
<BrowserMenu title="Info Panel" setCurrent={setCurrent}>
451-
<MenuItem
452-
text={
453-
<span>
454-
{scrollToTop && (
455-
<Icon
456-
name="check"
457-
width={12}
458-
height={12}
459-
fill="#ffffffff"
460-
className="menuCheck"
461-
/>
462-
)}
463-
Scroll to top
464-
</span>
465-
}
466-
onClick={() => {
467-
toggleScrollToTop();
468-
}}
469-
/>
470-
</BrowserMenu>
471-
</BrowserMenu>
472472
</Toolbar>
473473
);
474474
};

0 commit comments

Comments
 (0)