diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-09-22 19:34:01 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-10-24 12:23:48 +0200 |
| commit | a6ff5eee45215effb3344cb5d631a27a7c0369aa (patch) | |
| tree | 5051747acf72318b4fc5c18d603e3757fbefdfdb /src/components/organisms/toolbar/search.tsx | |
| parent | 651ea4fc992e77d2f36b3c68f8e7a70644246067 (diff) | |
refactor(components): rewrite form components
Diffstat (limited to 'src/components/organisms/toolbar/search.tsx')
| -rw-r--r-- | src/components/organisms/toolbar/search.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/organisms/toolbar/search.tsx b/src/components/organisms/toolbar/search.tsx index 1b2643c..b20f0d5 100644 --- a/src/components/organisms/toolbar/search.tsx +++ b/src/components/organisms/toolbar/search.tsx @@ -19,7 +19,7 @@ export type SearchProps = { /** * The button state. */ - isActive: BooleanFieldProps['checked']; + isActive: BooleanFieldProps['isChecked']; /** * A callback function to execute search. */ @@ -31,7 +31,7 @@ export type SearchProps = { }; const SearchWithRef: ForwardRefRenderFunction<HTMLDivElement, SearchProps> = ( - { className = '', isActive, searchPage, setIsActive }, + { className = '', isActive = false, searchPage, setIsActive }, ref ) => { const intl = useIntl(); @@ -57,9 +57,9 @@ const SearchWithRef: ForwardRefRenderFunction<HTMLDivElement, SearchProps> = ( return ( <div className={`${sharedStyles.item} ${searchStyles.item}`} ref={ref}> <BooleanField - checked={isActive} className={`${sharedStyles.checkbox} ${searchStyles.checkbox}`} id="search-button" + isChecked={isActive} name="search-button" onChange={setIsActive} type="checkbox" |
