Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Commit

Permalink
Avoid clientside sorting when in serverside mode
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
myarmolinsky committed Mar 20, 2024
1 parent ac3b3bf commit 51c1a8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/AutoUI/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,11 @@ const getColumnsFromSchema = <T extends AutoUIBaseResource<T>>({
? false
: typeof fieldCustomSort === 'function'
? fieldCustomSort
: isServerSide
? // This is a temporary solution to prevent clientside sorting for server side paginated tables
// This is a noop for .sort
// TODO: We should just avoid sorting in the Table component when isServerSide is true, look into this when rendition is gone
() => 0
: getSortingFunction<T>(key, val),
render: (fieldVal: string, entry: T) => {
const calculatedField = autoUIAdaptRefScheme(fieldVal, val);
Expand Down

0 comments on commit 51c1a8c

Please sign in to comment.