Skip to content

Commit

Permalink
fix: onchange dropdown checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
suryakumara committed Jun 30, 2023
1 parent 68424ca commit 02de000
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@beeinventor/dasiot-react-component-lib",
"version": "1.7.3",
"version": "1.7.4",
"module": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,6 @@ const DropdownCheckbox: React.VFC<DropdownCheckboxProps> = (props) => {
setIsOpen(false);
};

useEffect(() => {
if (itemChecked.length > 0) {
onSelect(itemChecked);
}
}, [itemChecked]);

useEffect(() => {
if (selectedIds === undefined || selectedIds.length === 0) {
setItemChecked([]);
Expand All @@ -126,6 +120,7 @@ const DropdownCheckbox: React.VFC<DropdownCheckboxProps> = (props) => {
updateValue.push(newValue);
}
setItemChecked(updateValue);
onSelect(updateValue);
};

const items = list
Expand Down

0 comments on commit 02de000

Please sign in to comment.