Skip to content

Commit

Permalink
STSMACOM-849: Add showSortIndicator prop to SearchAndSort to display …
Browse files Browse the repository at this point in the history
…sort indicator next to the column names. (#1500)
  • Loading branch information
Dmytro-Melnyshyn authored Aug 14, 2024
1 parent ba72ce0 commit 272db11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
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 @@ class SearchAndSort extends React.Component {
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 @@ -1311,6 +1312,7 @@ class SearchAndSort extends React.Component {
resultsCachedPosition,
resultsOnResetMarkedPosition,
resultRowFormatter,
showSortIndicator,
hasRowClickHandlers,
hidePageIndices,
pagingCanGoPrevious,
Expand Down Expand Up @@ -1353,6 +1355,7 @@ class SearchAndSort extends React.Component {
selectedRow={selectedItem}
formatter={resultsFormatter}
visibleColumns={visibleColumnsProp || visibleColumns}
showSortIndicator={showSortIndicator}
sortOrder={sortOrder.replace(/^-/, '').replace(/,.*/, '')}
sortDirection={sortOrder.startsWith('-') ? 'descending' : 'ascending'}
isEmptyMessage={message}
Expand Down

0 comments on commit 272db11

Please sign in to comment.