Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
sherfin94 committed Apr 8, 2022
2 parents 3c8b25d + 4d760d3 commit a9b6d00
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.1
1.9.2
13 changes: 7 additions & 6 deletions frontend/src/Editor/Components/Multiselect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const Multiselect = function Multiselect({
setExposedVariable,
onComponentClick,
darkMode,
fireEvent,
}) {
const { label, value, values, display_values, showAllOption } = properties;
const { borderRadius, visibility, disabledState } = styles;
Expand Down Expand Up @@ -62,13 +63,13 @@ export const Multiselect = function Multiselect({
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

useEffect(() => {
const onChangeHandler = (items) => {
setSelected(items);
setExposedVariable(
'values',
selected.map((option) => option.value)
);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selected]);
items.map((item) => item.value)
).then(() => fireEvent('onSelect'));
};

return (
<div
Expand All @@ -88,7 +89,7 @@ export const Multiselect = function Multiselect({
hasSelectAll={showAllOption ?? false}
options={selectOptions}
value={selected}
onChange={setSelected}
onChange={onChangeHandler}
labelledBy={'Select'}
disabled={disabledState}
className={`multiselect-box${darkMode ? ' dark' : ''}`}
Expand Down
2 changes: 1 addition & 1 deletion server/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.0
1.9.2

0 comments on commit a9b6d00

Please sign in to comment.