refactor(champs): refactor champs components to use typescript
This commit is contained in:
parent
76735819b4
commit
02f977fd8d
15 changed files with 119 additions and 111 deletions
20
app/javascript/components/ComboRegionsSearch.tsx
Normal file
20
app/javascript/components/ComboRegionsSearch.tsx
Normal file
|
@ -0,0 +1,20 @@
|
|||
import React from 'react';
|
||||
import { QueryClientProvider } from 'react-query';
|
||||
|
||||
import ComboSearch, { ComboSearchProps } from './ComboSearch';
|
||||
import { queryClient } from './shared/queryClient';
|
||||
|
||||
export default function ComboRegionsSearch(
|
||||
props: ComboSearchProps<{ code: string; nom: string }>
|
||||
) {
|
||||
return (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<ComboSearch
|
||||
{...props}
|
||||
scope="regions"
|
||||
minimumInputLength={0}
|
||||
transformResult={({ code, nom }) => [code, nom]}
|
||||
/>
|
||||
</QueryClientProvider>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue