Skip to content

Commit

Permalink
Merge pull request #33848 from aswin-s/fix/issue-33612
Browse files Browse the repository at this point in the history
fix: delay in  displaying comment length limit error
  • Loading branch information
tylerkaraszewski authored Jan 3, 2024
2 parents b3f1456 + 48f3a87 commit b097996
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useHandleExceedMaxCommentLength.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const useHandleExceedMaxCommentLength = () => {
[hasExceededMaxCommentLength],
);

const validateCommentMaxLength = useMemo(() => _.debounce(handleValueChange, 1500), [handleValueChange]);
const validateCommentMaxLength = useMemo(() => _.debounce(handleValueChange, 1500, {leading: true}), [handleValueChange]);

return {hasExceededMaxCommentLength, validateCommentMaxLength};
};
Expand Down

0 comments on commit b097996

Please sign in to comment.