demarches-normaliennes/app/javascript/components/ComboRegionsSearch.jsx
2021-02-16 18:14:10 +01:00

21 lines
573 B
JavaScript

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;