Skip to content

Commit

Permalink
Fixed initial value
Browse files Browse the repository at this point in the history
  • Loading branch information
e11en committed Mar 14, 2023
1 parent 7644da4 commit a7bb741
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Configurator/Components/YesNoSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ type YesNoSelectProps = {
const YesNoSelect: React.FC<YesNoSelectProps> = ({ placeholder, initial, onSelect = (s) => { } }) => {

console.log("YesNoSelect Initial", initial);
const [selection, setSelection] = useState(initial);
const [hidden, setHidden] = useState(true);
const [active, setActive] = useState(false);
const options = [
{key: "Yes", value: true},
{key: "No", value: false}
];
const [selection, setSelection] = useState(initial ? "Yes" : "No");
const [hidden, setHidden] = useState(true);
const [active, setActive] = useState(false);

const selectRef = useRef();
const optionsRef = useRef();
Expand Down

0 comments on commit a7bb741

Please sign in to comment.