Skip to content

Selecting option A enables another select dropdown #5149

Answered by manjushsh
GalliLuca asked this question in Q&A
Discussion options

You must be logged in to vote

@GalliLuca Please try this way:

import { useState } from "react";
import Select from "react-select";
import "./styles.css";

export default () => {
  const [isEffussionDisabled, updateEffussionDisabled] = useState(
    optionsAbsentPresent[0]
  );
  const [secondSelectValue, updateSecondSelectValue] = useState(null);
  return (
    <div className="App">
      <span>Is present or absent</span>
      <Select
        value={isEffussionDisabled}
        onChange={updateEffussionDisabled}
        options={optionsAbsentPresent}
      />
      <br />
      <br />

      <span>Second Select</span>
      <Select
        value={secondSelectValue}
        onChange={updateSecondSelectValue}
        o…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@GalliLuca
Comment options

@manjushsh
Comment options

@GalliLuca
Comment options

@manjushsh
Comment options

Answer selected by GalliLuca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants