Skip to content

Commit

Permalink
feat(*): case-insensitive searches
Browse files Browse the repository at this point in the history
#52

- all searches and filters are now case-insensitive
  • Loading branch information
valearna committed Nov 15, 2021
1 parent 14b4e8b commit 46f471d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/CellCheckboxSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const CellCheckboxSelector = ({cells, allCells, setCellsCallback}) => {
<Card style={{height: "350px", overflowY: "scroll"}}>
<Card.Body>
{allCells.data.filter(cell => showAllCells || cellsSet.has(cell))
.filter(cell => filterCells === '' || cell.startsWith(filterCells))
.filter(cell => filterCells === '' || cell.toLowerCase().startsWith(filterCells.toLowerCase()))
.sort().map(cell =>
<FormCheck type="checkbox"
label={cell}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/multiselect/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const MultiSelect = (props) => {
}

const handleFilterIdChange = (e) => {
setSelectedItemsToDisplay(new Set([...selectedItemsAll].filter(item => item.startsWith(e.target.value))));
setSelectedItemsToDisplay(new Set([...selectedItemsAll].filter(item => item.toLowerCase().startsWith(e.target.value.toLowerCase()))));
}

return (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/containers/SwarmPlotContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const SwarmPlotContainer = () => {
<Card style={{height: "250px", overflowY: "scroll"}}>
<Card.Body>
{[...new Set(data.map(d => d.y))]
.filter(gene => filterGenes === '' || gene.startsWith(filterGenes))
.filter(gene => filterGenes === '' || gene.toLowerCase().startsWith(filterGenes.toLowerCase()))
.sort().map(gene =>
<FormCheck type="checkbox"
label={gene}
Expand Down

0 comments on commit 46f471d

Please sign in to comment.