Skip to content

Commit

Permalink
fix(DatasetList): fix filter
Browse files Browse the repository at this point in the history
filter needs to be preserved when we close and reopen the dataset list
  • Loading branch information
ramfox committed Sep 5, 2019
1 parent 51a0a55 commit f412031
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/actions/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { setWorkingDataset, setSelectedListItem } from './selections'

import { RESET_MY_DATASETS } from '../reducers/myDatasets'

const pageSizeDefault = 15
const pageSizeDefault = 50
const bodyPageSizeDefault = 100

export function pingApi (): ApiActionThunk {
Expand Down
5 changes: 3 additions & 2 deletions app/components/DatasetList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface DatasetListProps {
}

export default class DatasetList extends React.Component<DatasetListProps> {
handleFilterKeyUp (e: any) {
handleFilterChange (e: any) {
const { setFilter } = this.props
const filter = e.target.value
setFilter(filter)
Expand Down Expand Up @@ -97,7 +97,8 @@ export default class DatasetList extends React.Component<DatasetListProps> {
type='text'
name='filter'
placeholder='Filter'
onKeyUp={(e) => this.handleFilterKeyUp(e)}
value={filter}
onChange={(e) => this.handleFilterChange(e)}
/>
</div>
<div className='strong-message'>You have {filteredDatasets.length} local datasets</div>
Expand Down

0 comments on commit f412031

Please sign in to comment.