-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
530 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export default function getValuesArrayFromQuery(val: string | Array<string> | undefined) { | ||
if (val === undefined) { | ||
return; | ||
} | ||
|
||
const valArray = []; | ||
if (typeof val === 'string') { | ||
valArray.push(...val.split(',')); | ||
} | ||
if (Array.isArray(val)) { | ||
if (!val.length) { | ||
return; | ||
} | ||
val.forEach(el => valArray.push(...el.split(','))); | ||
} | ||
|
||
return valArray; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react'; | ||
|
||
import FilterInput from 'ui/shared/filters/FilterInput'; | ||
import TableColumnFilter from 'ui/shared/filters/TableColumnFilter'; | ||
|
||
type Props = { | ||
value?: string; | ||
handleFilterChange: (val: string) => void; | ||
title: string; | ||
columnName: string; | ||
onClose?: () => void; | ||
} | ||
|
||
const AddressMudRecordsKeyFilter = ({ value = '', handleFilterChange, columnName, title, onClose }: Props) => { | ||
const [ filterValue, setFilterValue ] = React.useState<string>(value); | ||
|
||
const onFilter = React.useCallback(() => { | ||
handleFilterChange(filterValue); | ||
}, [ handleFilterChange, filterValue ]); | ||
|
||
return ( | ||
<TableColumnFilter | ||
title={ title } | ||
isFilled={ filterValue !== value } | ||
onFilter={ onFilter } | ||
onClose={ onClose } | ||
> | ||
<FilterInput | ||
initialValue={ value } | ||
size="xs" | ||
onChange={ setFilterValue } | ||
placeholder={ columnName } | ||
/> | ||
</TableColumnFilter> | ||
); | ||
}; | ||
|
||
export default AddressMudRecordsKeyFilter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.