Open huicha opened 4 years ago
I use axios for consuming API. like this;
<Select2
isSelectSingle
style={{ borderRadius: 5 }}
colorTheme="blue"
popupTitle="My list"
title="TITLE"
data={this.state.dataFromServer}
onSelect={(data) => {
// console.log(data);
this.handleGetId(data)
}}
onRemoveItem={(data) => {
this.setState({ selectedVal: null });
}}
/>
It's possible to use data from remote server? I am only see examples with mockData and works fine, but if I want to assign data from graphql object the selection it ins't work. I see the attribute checked it isn't setted.
I am wrong ?