Skip to content

Commit

Permalink
Merge pull request #4010 from GovAlta/CS-3892
Browse files Browse the repository at this point in the history
fix(fast typing re-refresh)
  • Loading branch information
jonathanweyermann authored Jan 23, 2025
2 parents 2089efd + c7ab911 commit db4c02b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,7 @@ export const GoAInputInteger = (props: GoAInputIntegerProps): JSX.Element => {
placeholder={placeholder}
name={appliedUiSchemaOptions?.name || `${id || label}-input`}
testId={appliedUiSchemaOptions?.testId || `${id}-input`}
onKeyPress={(name: string, value: string, key: string) => {
onKeyPressNumericControl({
name,
value,
key,
controlProps: props as ControlProps,
});
}}
onKeyPress={(name: string, value: string, key: string) => {}}
onBlur={(name: string, value: string) => {
onBlurForNumericControl({
name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,7 @@ export const GoANumberInput = (props: GoAInputNumberProps): JSX.Element => {
width={width}
name={appliedUiSchemaOptions?.name || `${id || label}-input`}
testId={appliedUiSchemaOptions?.testId || `${id}-input`}
onKeyPress={(name: string, value: string, key: string) => {
onKeyPressNumericControl({
name,
value,
key,
controlProps: props as ControlProps,
});
}}
onKeyPress={(name: string, value: string, key: string) => {}}
onBlur={(name: string, value: string) => {
onBlurForNumericControl({
name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,7 @@ export const GoAInputText = (props: GoAInputTextProps): JSX.Element => {
controlProps: props as ControlProps,
});
}}
onKeyPress={(name: string, value: string, key: string) => {
onKeyPressForTextControl({
name,
value: autoCapitalize ? value.toUpperCase() : value,
key,
controlProps: props as ControlProps,
});
}}
onKeyPress={(name: string, value: string, key: string) => {}}
onBlur={(name: string, value: string) => {
onBlurForTextControl({
name,
Expand Down
5 changes: 2 additions & 3 deletions libs/jsonforms-components/src/lib/util/inputControlUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,8 @@ export const onChangeForInputControl = (props: EventChangeControlProps) => {
const { value } = props;
const { controlProps } = props;
const { handleChange, path } = controlProps;
if (value && value !== null) {
handleChange(path, value);
}

handleChange(path, value);
};

/**
Expand Down

0 comments on commit db4c02b

Please sign in to comment.