From 62008de7b0ad9a148a3da8ed08761616c1e75ba3 Mon Sep 17 00:00:00 2001 From: Avior Date: Wed, 28 Sep 2022 14:39:15 +0200 Subject: [PATCH] fix: onValueEvent not sending with value Signed-off-by: Avior --- src/Input/Input.stories.tsx | 11 +++++++++++ src/Input/index.tsx | 1 + 2 files changed, 12 insertions(+) diff --git a/src/Input/Input.stories.tsx b/src/Input/Input.stories.tsx index de24de6..990704f 100644 --- a/src/Input/Input.stories.tsx +++ b/src/Input/Input.stories.tsx @@ -76,6 +76,17 @@ tmp.args = {label: 'Label', helper: 'Helper', strictChoices: true, choices: [ export const Select = tmp +tmp = Input.bind({}) +tmp.args = {label: 'Label', helper: 'Helper', type: 'number', iconLeft: { + icon: X, + transformer: (v: string) => { + console.log("POUET :D") + return "" + } +}} + +export const Number = tmp + tmp = Input.bind({}) tmp.args = {block: true, type: 'textarea', defaultValue : 'd', label: 'Label', helper: 'Helper', choices: [ 'a', diff --git a/src/Input/index.tsx b/src/Input/index.tsx index 42629a0..7760a05 100644 --- a/src/Input/index.tsx +++ b/src/Input/index.tsx @@ -368,6 +368,7 @@ export default class Input extends React.PureComponent { } if (this.props.value) { + this.props.onValue?.(value) return }