Skip to content

Commit

Permalink
feat(ui): sort partition keys to the top of the table for better visi…
Browse files Browse the repository at this point in the history
  • Loading branch information
ngamanda authored and sleeperdeep committed Jun 25, 2024
1 parent 349a20a commit 9fd1d64
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,15 @@ export const SchemaTab = ({ properties }: { properties?: any }) => {
}
}, [hasValueSchema, hasKeySchema, setShowKeySchema]);

const sortedFields = schemaMetadata?.fields?.slice().sort((a, b) => {
if (a.isPartitioningKey === b.isPartitioningKey) {
return 0;
}
return a.isPartitioningKey ? -1 : 1;
});

const { filteredRows, expandedRowsFromFilter } = filterSchemaRows(
schemaMetadata?.fields,
sortedFields,
editableSchemaMetadata,
filterText,
entityRegistry,
Expand Down

0 comments on commit 9fd1d64

Please sign in to comment.