mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-17 21:00:45 +00:00
Update to sort columns based on table sections
This commit is contained in:
@ -265,7 +265,17 @@ function EntityList({table}: Props): JSX.Element
|
||||
rows.push(row);
|
||||
});
|
||||
|
||||
const sortedKeys = [...tableMetaData.fields.keys()].sort();
|
||||
const sortedKeys: string[] = [];
|
||||
|
||||
for (let i = 0; i < tableMetaData.sections.length; i++)
|
||||
{
|
||||
const section = tableMetaData.sections[i];
|
||||
for (let j = 0; j < section.fieldNames.length; j++)
|
||||
{
|
||||
sortedKeys.push(section.fieldNames[j]);
|
||||
}
|
||||
}
|
||||
|
||||
sortedKeys.forEach((key) =>
|
||||
{
|
||||
const field = tableMetaData.fields.get(key);
|
||||
|
Reference in New Issue
Block a user