demarches-normaliennes/app/javascript/components/ComboRegionsSearch.jsx

22 lines
573 B
React
Raw Normal View History

2020-10-07 17:41:51 +02:00
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;