Skip to content

Commit

Permalink
fix maxlength being set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
m1aw committed Aug 21, 2023
1 parent 01f11ed commit a9b39ef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function FieldContainer(props: FieldContainerProps) {
value={value}
onInput={onInput}
onBlur={onBlur}
maxLength={maxLength}
maxlength={maxLength}
trimOnBlur={trimOnBlur}
disabled={disabled}
required={!isOptional}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export interface InputBaseProps extends h.JSX.HTMLAttributes {
onCreateRef?(reference: HTMLInputElement): void;
onBlurHandler?: h.JSX.GenericEventHandler<HTMLInputElement>;
onFocusHandler?: h.JSX.GenericEventHandler<HTMLInputElement>;
maxlength?: number | null;
}

export default function InputBase({ onCreateRef, ...props }: InputBaseProps) {
Expand Down
4 changes: 2 additions & 2 deletions packages/lib/src/components/internal/FormFields/InputText.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { h } from 'preact';
import InputBase from './InputBase';
import InputBase, { InputBaseProps } from './InputBase';

export default function InputText(props) {
export default function InputText(props: InputBaseProps) {
/* Type of input base is always text, which is combined with using inputmode to change mobile keyboards.
* This gives the most consistent and performant mobile input experience.
*/
Expand Down

0 comments on commit a9b39ef

Please sign in to comment.