Fixed dropdown component on editNode
This commit is contained in:
parent
72baa7c2be
commit
207e76a09d
1 changed files with 5 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { Listbox, Transition } from "@headlessui/react";
|
||||
import { Check, ChevronsUpDown } from "lucide-react";
|
||||
import { Fragment, useState } from "react";
|
||||
import { Fragment, useEffect, useState } from "react";
|
||||
import { DropDownComponentType } from "../../types/components";
|
||||
import { classNames } from "../../utils";
|
||||
|
||||
|
|
@ -16,6 +16,10 @@ export default function Dropdown({
|
|||
value === "" || !value ? "Choose an option" : value
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
setInternalValue(value === "" || !value ? "Choose an option" : value);
|
||||
}, [value]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Listbox
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue