Skip to content

Commit

Permalink
refactor: replace LibreTagsDropdown with TagsSuiviPersoDropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
elisfainstein committed Jan 7, 2025
1 parent 9994096 commit e705a34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
SelectOption,
} from '@/ui';
import { useRef } from 'react';
import LibreTagsDropdown from '../../../../../ui/dropdownLists/LibreTagsDropdown/LibreTagsDropdown';
import TagsSuiviPersoDropdown from '../../../../../ui/dropdownLists/TagsSuiviPersoDropdown/TagsSuiviPersoDropdown';

type Props = {
filters: Filtre;
Expand Down Expand Up @@ -110,14 +110,16 @@ const MenuFiltresToutesLesFichesAction = ({ filters, setFilters }: Props) => {
/>
</Field>

<Field title="Tags libres">
<LibreTagsDropdown
<Field title="Tags personnalisés">
<TagsSuiviPersoDropdown
values={filters.libreTagsIds}
onChange={({ tags }) => {
onChange={({ libresTag }) => {
const { libreTagsIds, ...rest } = filters;
setFilters({
...rest,
...(tags ? { libreTagsIds: tags.map((t) => t.id) } : {}),
...(libresTag
? { libreTagsIds: libresTag.map((t) => t.id) }
: {}),
});
}}
/>
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit e705a34

Please sign in to comment.