Skip to content

Commit ff83392

Browse files
committed
fix: explictly pass textfield change event target
1 parent fb51de7 commit ff83392

File tree

1 file changed

+8
-1
lines changed
  • packages/form-js-viewer/src/render/components/form-fields

1 file changed

+8
-1
lines changed

packages/form-js-viewer/src/render/components/form-fields/Textfield.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,19 @@ export function Textfield(props) {
1919

2020
const { required } = validate;
2121

22-
const [onInputChange, flushOnChange] = useFlushDebounce(({ target }) => {
22+
const [onChange, flushOnChange] = useFlushDebounce(({ target }) => {
2323
props.onChange({
2424
value: target.value,
2525
});
2626
});
2727

28+
/**
29+
* @param {import('preact').JSX.TargetedEvent<HTMLInputElement, Event>} event
30+
*/
31+
const onInputChange = (event) => {
32+
onChange({ target: event.target });
33+
};
34+
2835
const onInputBlur = () => {
2936
flushOnChange && flushOnChange();
3037
onBlur && onBlur();

0 commit comments

Comments
 (0)