Open Bonapara opened 3 months ago
To ensure the Filter
and Sort
menu items match the order of the table column headers, follow these steps:
Locate Column Order Definition: Open RecordTableHeader.tsx
and identify the order of the columns.
Adjust Menu Rendering Logic: Open RecordTableColumnDropdownMenu.tsx
and modify the logic to render menu items in the same order as defined in RecordTableHeader.tsx
.
Example Implementation:
// RecordTableHeader.tsx
const columnHeaders = ['Name', 'Age', 'Address'];
// RecordTableColumnDropdownMenu.tsx const menuItems = columnHeaders.map(header => (
));
Ensure the `menuItems` array in `RecordTableColumnDropdownMenu.tsx` is generated based on the `columnHeaders` array from `RecordTableHeader.tsx`.
### References
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?
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
@Bonapara I would like to take this, started working do assign.
/assign
/assign
This issue is already assigned to you. Let's get this shipped!
Current Behavior
Filter
andSort
menu items are displayed in alphabetical order (1)Desired Behavior
Visible
Filter
andSort
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)