Implement ComboRegionsSearch
This commit is contained in:
parent
1b57d94d93
commit
2c7ee82d31
3 changed files with 27 additions and 4 deletions
21
app/javascript/components/ComboRegionsSearch.js
Normal file
21
app/javascript/components/ComboRegionsSearch.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
import React from 'react';
|
||||
import { ReactQueryCacheProvider } from 'react-query';
|
||||
|
||||
import ComboSearch from './ComboSearch';
|
||||
import { queryCache } from './shared/queryCache';
|
||||
|
||||
function ComboRegionsSearch(params) {
|
||||
return (
|
||||
<ReactQueryCacheProvider queryCache={queryCache}>
|
||||
<ComboSearch
|
||||
required={params.mandatory}
|
||||
hiddenFieldId={params.hiddenFieldId}
|
||||
scope="regions"
|
||||
minimumInputLength={0}
|
||||
transformResult={({ code, nom }) => [code, nom]}
|
||||
/>
|
||||
</ReactQueryCacheProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export default ComboRegionsSearch;
|
Loading…
Add table
Add a link
Reference in a new issue