react-native-select-two icon indicating copy to clipboard operation
react-native-select-two copied to clipboard

Data from remote server

Open huicha opened this issue 4 years ago • 1 comments

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 ?

huicha avatar May 25 '20 23:05 huicha

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 });
                            }}
                        />

k2an avatar Jun 16 '22 19:06 k2an