We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0c209cf + bd66f65 commit 8e71355Copy full SHA for 8e71355
package.json
@@ -1,6 +1,6 @@
1
{
2
"name": "@beeinventor/dasiot-react-component-lib",
3
- "version": "1.1.8",
+ "version": "1.1.9",
4
"module": "lib/index.js",
5
"types": "lib/index.d.ts",
6
"files": [
src/components/Dropdown/Dropdown.tsx
@@ -82,7 +82,16 @@ const Dropdown: React.VFC<DropDownProps> = (props) => {
82
}
83
84
85
- }, [selectedId, list]);
+ }, [selectedId]);
86
+
87
+ useEffect(() => {
88
+ for (let i = 0; i < list.length; i++) {
89
+ if (selectedId === list[i].id) {
90
+ setSelectedItem(list[i]);
91
+ break;
92
+ }
93
94
+ }, [list]);
95
96
const handleOnClickSelect = () => {
97
setIsOpen(true);
0 commit comments