Skip to content

Commit

Permalink
[Schema] Add visual highlight to currently active sorting order (#3180)
Browse files Browse the repository at this point in the history
![image](https://github.com/user-attachments/assets/add15837-bf2a-4bee-abbf-1995b8f85e15)

Highlights the current active sorting mode in the sidebar (Closes #2815)
  • Loading branch information
finnar-bin authored Feb 3, 2025
1 parent db98b4c commit eb70ca2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/apps/schema/src/app/components/Sidebar/ModelList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export const ModelList = ({ title, models, type, app = "schema" }: Props) => {
<ThemeProvider theme={theme}>
<Menu anchorEl={anchorEl} open={open} onClose={handleClose}>
<MenuItem
selected={sort === "asc"}
onClick={() => {
handleClose();
setSort("asc");
Expand All @@ -143,6 +144,7 @@ export const ModelList = ({ title, models, type, app = "schema" }: Props) => {
Name (A to Z)
</MenuItem>
<MenuItem
selected={sort === "desc"}
onClick={() => {
handleClose();
setSort("desc");
Expand All @@ -151,6 +153,7 @@ export const ModelList = ({ title, models, type, app = "schema" }: Props) => {
Name (Z to A)
</MenuItem>
<MenuItem
selected={!sort}
onClick={() => {
handleClose();
setSort("");
Expand All @@ -159,6 +162,7 @@ export const ModelList = ({ title, models, type, app = "schema" }: Props) => {
Last Created
</MenuItem>
<MenuItem
selected={sort === "modified"}
onClick={() => {
handleClose();
setSort("modified");
Expand Down

0 comments on commit eb70ca2

Please sign in to comment.