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 1 commit
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* Add check for the error status when error occurs during adding tag. STSMACOM-844.
* 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.
* Add `showSortIndicator` prop to `SearchAndSort` to display sort indicator next to the column names. STSMACOM-849.

## [9.1.1] (IN PROGRESS)

Expand Down
3 changes: 3 additions & 0 deletions lib/SearchAndSort/SearchAndSort.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,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 @@ -1301,6 +1302,7 @@ class SearchAndSort extends React.Component {
resultsCachedPosition,
resultsOnResetMarkedPosition,
resultRowFormatter,
showSortIndicator,
hasRowClickHandlers,
hidePageIndices,
pagingCanGoPrevious,
Expand Down Expand Up @@ -1343,6 +1345,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
Loading