Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
balanza committed Aug 7, 2024
1 parent ddfccda commit c859461
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions assets/js/common/ComposedFilter/ComposedFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@ import Button from '@common/Button';
import Filter from '@common/Filter';
import DateFilter from '@common/DateFilter';

const renderFilter = ({ type, ...filterProps }, value, onChange) => {
const renderFilter = (key, { type, ...filterProps }, value, onChange) => {
switch (type) {
case 'select':
return <Filter {...filterProps} value={value} onChange={onChange} />;
return (
<Filter key={key} {...filterProps} value={value} onChange={onChange} />
);
case 'date':
return <DateFilter {...filterProps} value={value} onChange={onChange} />;
return (
<DateFilter
key={key}
{...filterProps}
value={value}
onChange={onChange}
/>
);
default:
return null;
}
Expand Down

0 comments on commit c859461

Please sign in to comment.