Skip to content

Commit

Permalink
(#0) npm publish (0.0.142)
Browse files Browse the repository at this point in the history
  • Loading branch information
baegofda committed Jan 8, 2024
1 parent f864b36 commit cf348e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bbodek-ui",
"version": "0.0.141",
"version": "0.0.142",
"type": "module",
"author": "Bbodek",
"license": "MIT",
Expand Down
6 changes: 3 additions & 3 deletions src/core/components/Input/InputTextArea/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ const InputTextArea = forwardRef((
ref: React.Ref<HTMLTextAreaElement>,
) => {
const id = useId();
const { rootClassName, className, required, value, onChange, autoComplete = "off", maxLength, error, name, ...rest } = props;
const { rootClassName, className, required, value, onChange, autoComplete = "off", maxLength = 150, error, name, ...rest } = props;
const { inputValue, onChangeHandler } = useInput({ value, regCallback, onChange, name });
const currentInputValueLength = (inputValue as string).length;
const currentInputValueLength = (inputValue as string)?.length || 0;

const onChangeTextArea = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
if(e.target.value.length > maxLength!) return;
if((e.target?.value ?? "").length > maxLength) return;

onChangeHandler(e);
};
Expand Down

0 comments on commit cf348e7

Please sign in to comment.