diff --git a/frontend/src/Editor/Components/NumberInput.jsx b/frontend/src/Editor/Components/NumberInput.jsx index bf2514b6e2..1958479a6b 100644 --- a/frontend/src/Editor/Components/NumberInput.jsx +++ b/frontend/src/Editor/Components/NumberInput.jsx @@ -1,6 +1,13 @@ import React, { useEffect } from 'react'; -export const NumberInput = function NumberInput({ height, properties, styles, setExposedVariable, component }) { +export const NumberInput = function NumberInput({ + height, + properties, + styles, + setExposedVariable, + component, + fireEvent, +}) { const { visibility, borderRadius } = styles; const [value, setValue] = React.useState(parseInt(properties.value)); @@ -19,6 +26,7 @@ export const NumberInput = function NumberInput({ height, properties, styles, se } else { setValue(parseInt(e.target.value)); } + fireEvent('onChange'); }; useEffect(() => { diff --git a/frontend/src/Editor/WidgetManager/widgetConfig.js b/frontend/src/Editor/WidgetManager/widgetConfig.js index bafe250bbe..2d86090cdb 100644 --- a/frontend/src/Editor/WidgetManager/widgetConfig.js +++ b/frontend/src/Editor/WidgetManager/widgetConfig.js @@ -1061,7 +1061,9 @@ export const widgets = [ }, }, }, - events: {}, + events: { + onChange: { displayName: 'On change' }, + }, styles: { visibility: { type: 'toggle',