Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove one dropdown value from options #234

Open
lee-corey opened this issue Jan 2, 2020 · 0 comments
Open

remove one dropdown value from options #234

lee-corey opened this issue Jan 2, 2020 · 0 comments

Comments

@lee-corey
Copy link

I am using this modal dropdown and it's good. I set the options as state and I want to remove one from that option so I should change the displayed value. How can I archive this?

<ModalDropdown
                  textStyle={styles.modalText}
                  style={styles.modalStyle}
                  dropdownTextStyle={styles.modalText}
                  defaultValue={this.state.selectedDest}
                  onSelect={(index, value) =>
                    this.setState({selectedDest: value, selectedIndex: index})
                  }
                  options={this.state.destList}
                />

For example. I have ["ant, 'apple', 'car'] in the destList and I select the apple. I remove apple while app is running so I can't see apple in the dropdown but I can still see apple is selected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant