Skip to content

Commit

Permalink
Merge pull request #215 from KPMP/KPMP-4667_sort_using_index
Browse files Browse the repository at this point in the history
KPMP-4667: modified filter box to not include sort fields
  • Loading branch information
rlreamy authored Sep 5, 2023
2 parents 7c3c935 + 32c9752 commit 90174e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/components/SpatialViewer/ImageDatasetList.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ImageDatasetList extends Component {
constructor(props) {
super(props);
const columnCards = this.getColumns().map((item, index) => {
return {id: index, text: item.title, name: item.name, hideable: item.hideable}
return {id: index, text: item.title, name: item.name, hideable: item.hideable, isSortField: item?.isSortField}
});

const defaultHiddenColumns = this.getDefaultHiddenColumnNames(this.getColumns())
Expand Down Expand Up @@ -92,7 +92,7 @@ class ImageDatasetList extends Component {

setDefaultCards = () => {
const cards = this.getColumns().map((item, index) => {
return {id: index, text: item.title, name: item.name, hideable: item.hideable}
return {id: index, text: item.title, name: item.name, hideable: item.hideable, isSortField: item?.isSortField}
});
this.setCards(cards)
};
Expand Down Expand Up @@ -151,7 +151,8 @@ class ImageDatasetList extends Component {
name: 'file_name_sort',
sortable: false,
hideable: false,
defaultHidden: true
defaultHidden: true,
isSortField: true
}
];
return columns;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function ColumnArrangementDialog(
</span>
</div>

<div>{cards.map((card, index) => {
<div>{cards.filter((card) => {return card.isSortField !== true}).map((card, index) => {
return (
<div key={card.text}>
{isFiltered(card.text, filterValue)
Expand Down

0 comments on commit 90174e6

Please sign in to comment.