Skip to content

Commit

Permalink
chore(textarea): add usecallback dep
Browse files Browse the repository at this point in the history
  • Loading branch information
IsDyh01 committed Oct 31, 2024
1 parent 80eead7 commit d57ed70
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions packages/components/input/src/use-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -533,12 +533,15 @@ export function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTML
[slots, isClearButtonFocusVisible, clearPressProps, clearFocusProps, classNames?.clearButton],
);

const getHeaderWrapperProps: PropGetter = useCallback((props = {}) => {
return {
...props,
className: slots.headerWrapper({class: clsx(classNames?.headerWrapper, props?.className)}),
};
}, []);
const getHeaderWrapperProps: PropGetter = useCallback(
(props = {}) => {
return {
...props,
className: slots.headerWrapper({class: clsx(classNames?.headerWrapper, props?.className)}),
};
},
[slots, classNames?.headerWrapper],
);

return {
Component,
Expand Down

0 comments on commit d57ed70

Please sign in to comment.