Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu Items Order Should Match Table Column Headers Order #5960

Closed
Bonapara opened this issue Jun 19, 2024 · 7 comments · Fixed by #7392
Closed

Menu Items Order Should Match Table Column Headers Order #5960

Bonapara opened this issue Jun 19, 2024 · 7 comments · Fixed by #7392
Assignees
Labels
for experienced contributor scope: front Issues that are affecting the frontend side only size: short

Comments

@Bonapara
Copy link
Member

Bonapara commented Jun 19, 2024

Current Behavior

Filter and Sort menu items are displayed in alphabetical order (1)

CleanShot 2024-06-19 at 15 20 43

Desired Behavior

Visible Filter and Sort menu items (1) should be displayed in the same order as the column headers in the table (2)(A).

Hidden columns should be displayed below - in a different section - by alphabetical order (B). There should be a separator between the two sections (C)

CleanShot 2024-06-19 at 16 47 24

Copy link
Contributor

greptile-apps bot commented Jun 19, 2024

To ensure the Filter and Sort menu items match the order of the table column headers, follow these steps:

  1. Locate Column Order Definition: Open RecordTableHeader.tsx and identify the order of the columns.

  2. Adjust Menu Rendering Logic: Open RecordTableColumnDropdownMenu.tsx and modify the logic to render menu items in the same order as defined in RecordTableHeader.tsx.

  3. Example Implementation:

// RecordTableHeader.tsx
const columnHeaders = ['Name', 'Age', 'Address'];

// RecordTableColumnDropdownMenu.tsx
const menuItems = columnHeaders.map(header => (
  <MenuItem key={header}>
    {header}
  </MenuItem>
));

Ensure the menuItems array in RecordTableColumnDropdownMenu.tsx is generated based on the columnHeaders array from RecordTableHeader.tsx.

References

@FelixMalfait
Copy link
Member

FelixMalfait commented Jun 19, 2024

You can filter/sort on fields that aren't visible on the table. That might get a bit confusing? The ones that are not visible should then be sorted alphabetically?

@Bonapara
Copy link
Member Author

You can filter/sort on fields that aren't visible on the table. That might get a bit confusing? The ones that are not visible should then be sorted alphabetically?

Issue description updated: Let's introduce a second section for non visible fields to make things clear

@Nabhag8848
Copy link
Contributor

@Bonapara I would like to take this, started working do assign.

@Nabhag8848
Copy link
Contributor

/assign

@Nabhag8848
Copy link
Contributor

/assign

Copy link

oss-gg bot commented Oct 2, 2024

This issue is already assigned to you. Let's get this shipped!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for experienced contributor scope: front Issues that are affecting the frontend side only size: short
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants