SelectMenu in React?
wdym trigger it? it should be triggered by the user.
something like this if (!mailEnvelopeFromDomainSelected ) { mailEnvelopeFromDomainSelected = selectedDomains[0] || null; this.setState({selectedDomains: mailEnvelopeFromDomainSelected}) }
what are you trying to do?
I have a multi-select menu with domains, domains which are selected in this form are used as options in another single-select menu If I remove a domain entry from first multi-select menu it should be automatically switched to another in second single-select menu
the state for both selector should be managed by a parent component that passes down callbacks, one useEffect that check for the first select value and set the second accordingly.
it does that visually right now
wdym visually?
Обсуждают сегодня