done 1
This commit is contained in:
parent
8c14b16ca1
commit
5487c5cb5c
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,6 @@
|
||||||
|
query getStores{
|
||||||
|
stores{
|
||||||
|
id,
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
|
@ -25,7 +25,17 @@ const StoreSelect = React.memo(({ value, onChange }: StoreSelectProps) => {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>Store select</div>
|
<Query query={queries.getStores}>
|
||||||
|
{({ data: { stores = [] } }) => (
|
||||||
|
<Select value={value} onChange={onChangeStore}>
|
||||||
|
<option key="default" value="">Select a store</option>
|
||||||
|
{stores.map(({ id, name }: Store) => {
|
||||||
|
return (<option key={id} value={id}>{name}</option>)
|
||||||
|
})}
|
||||||
|
</Select>
|
||||||
|
)}
|
||||||
|
|
||||||
|
</Query>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue