Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STSMACOM-849: Add showSortIndicator prop to SearchAndSort to display sort indicator next to the column names. #1500

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* Add optional `isRequestUrlExceededLimit` property to `<SearchAndSort>` to return a specific error message in `StripesConnectedSource`. Refs STSMACOM-846.
* Add `requiredFields` prop to `DateRangeFilter` to support open-ended date ranges. STSMACOM-838.
* Provide `startLabel` and `endLabel` props in `<DateRangeFilter>` to enable unique accessible labeling. STSMACOM-848.
* Add `showSortIndicator` prop to `SearchAndSort` to display sort indicator next to the column names. STSMACOM-849.

## [9.1.1] (IN PROGRESS)

* `<AdvancedSearch>` Improve algorithm of splitting query string into rows. Refs STSMACOM-831.
Expand Down
3 changes: 3 additions & 0 deletions lib/SearchAndSort/SearchAndSort.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@
searchFieldButtonLabel: PropTypes.node,
selectedIndex: PropTypes.string,
showSingleResult: PropTypes.bool, // whether to auto-show the details record when a search returns a single row
showSortIndicator: PropTypes.bool,
sortableColumns: PropTypes.arrayOf(PropTypes.string),
stripes: PropTypes.shape({
connect: PropTypes.func,
Expand Down Expand Up @@ -1213,7 +1214,7 @@
disableFilters,
searchableIndexes,
selectedIndex,
autofocusSearchField,

Check warning on line 1217 in lib/SearchAndSort/SearchAndSort.js

View workflow job for this annotation

GitHub Actions / build-npm

'autofocusSearchField' is assigned a value but never used. Allowed unused vars must match /React/u

Check warning on line 1217 in lib/SearchAndSort/SearchAndSort.js

View workflow job for this annotation

GitHub Actions / build-npm

'autofocusSearchField' is assigned a value but never used. Allowed unused vars must match /React/u
searchFieldButtonLabel,
advancedSearchOptions,
inputType,
Expand Down Expand Up @@ -1311,6 +1312,7 @@
resultsCachedPosition,
resultsOnResetMarkedPosition,
resultRowFormatter,
showSortIndicator,
hasRowClickHandlers,
hidePageIndices,
pagingCanGoPrevious,
Expand Down Expand Up @@ -1353,6 +1355,7 @@
selectedRow={selectedItem}
formatter={resultsFormatter}
visibleColumns={visibleColumnsProp || visibleColumns}
showSortIndicator={showSortIndicator}
sortOrder={sortOrder.replace(/^-/, '').replace(/,.*/, '')}
sortDirection={sortOrder.startsWith('-') ? 'descending' : 'ascending'}
isEmptyMessage={message}
Expand Down
Loading