Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
**Bug fixes**

- Fixed the return type of `getDefaultEuiMarkdownUiPlugins` ([#4567](https://github.com/elastic/eui/pull/4567))
- Fixed inverse handling of boolean sorting in `EuiDataGrid` ([#4561](https://github.com/elastic/eui/pull/4561))

## [`31.8.0`](https://github.com/elastic/eui/tree/v31.8.0)

Expand Down
8 changes: 4 additions & 4 deletions src/components/datagrid/data_grid_schema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,21 @@ export const schemaDetectors: EuiDataGridSchemaDetector[] = [
comparator(a, b, direction) {
const aValue = a.toLowerCase() === 'true';
const bValue = b.toLowerCase() === 'true';
if (aValue < bValue) return direction === 'asc' ? 1 : -1;
if (aValue > bValue) return direction === 'asc' ? -1 : 1;
if (aValue < bValue) return direction === 'asc' ? -1 : 1;
if (aValue > bValue) return direction === 'asc' ? 1 : -1;
return 0;
},
icon: 'tokenBoolean',
sortTextAsc: (
<EuiI18n
token="euiDataGridSchema.booleanSortTextAsc"
default="True-False"
default="False-True"
/>
),
sortTextDesc: (
<EuiI18n
token="euiDataGridSchema.booleanSortTextDesc"
default="False-True"
default="True-False"
/>
),
},
Expand Down