Fix stories
This commit is contained in:
parent
f0d343dec6
commit
1027e215a2
3 changed files with 1520 additions and 485 deletions
|
@ -32,7 +32,7 @@ const Story: React.FC<
|
|||
enableLoadMore: boolean;
|
||||
}
|
||||
>
|
||||
> = storyProps => {
|
||||
> = ({ allowCustomValues, enableLoadMore }) => {
|
||||
const { change, data: countries } = useMultiAutocomplete([suggestions[0]]);
|
||||
|
||||
return (
|
||||
|
@ -49,9 +49,9 @@ const Story: React.FC<
|
|||
onChange={event => change(event, choices)}
|
||||
value={countries.map(country => country.value)}
|
||||
loading={loading}
|
||||
hasMore={storyProps.enableLoadMore ? hasMore : false}
|
||||
onFetchMore={storyProps.enableLoadMore ? fetchMore : undefined}
|
||||
{...storyProps}
|
||||
hasMore={enableLoadMore ? hasMore : false}
|
||||
onFetchMore={enableLoadMore ? fetchMore : undefined}
|
||||
allowCustomValues={allowCustomValues}
|
||||
/>
|
||||
)}
|
||||
</ChoiceProvider>
|
||||
|
|
|
@ -33,7 +33,7 @@ const Story: React.FC<
|
|||
enableLoadMore: boolean;
|
||||
}
|
||||
>
|
||||
> = storyProps => {
|
||||
> = ({ allowCustomValues, emptyOption, enableLoadMore }) => {
|
||||
const [displayValue, setDisplayValue] = React.useState(suggestions[0].label);
|
||||
|
||||
return (
|
||||
|
@ -57,9 +57,10 @@ const Story: React.FC<
|
|||
loading={loading}
|
||||
onChange={handleSelect}
|
||||
value={data.country}
|
||||
hasMore={storyProps.enableLoadMore ? hasMore : false}
|
||||
onFetchMore={storyProps.enableLoadMore ? fetchMore : undefined}
|
||||
{...storyProps}
|
||||
hasMore={enableLoadMore ? hasMore : false}
|
||||
onFetchMore={enableLoadMore ? fetchMore : undefined}
|
||||
allowCustomValues={allowCustomValues}
|
||||
emptyOption={emptyOption}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue