diff --git a/src/registry/default/extension/breadcrumb.tsx b/src/registry/default/extension/breadcrumb.tsx index 3ea4f85..0ecc15f 100644 --- a/src/registry/default/extension/breadcrumb.tsx +++ b/src/registry/default/extension/breadcrumb.tsx @@ -134,6 +134,7 @@ export const BreadCrumb = ({ setOpen(!open); } }, + // eslint-disable-next-line react-hooks/exhaustive-deps [activeIndex, value, prevValue] ); @@ -223,6 +224,7 @@ export const BreadCrumbItem = forwardRef< return () => { onPrevValueChange(value); }; + // eslint-disable-next-line react-hooks/exhaustive-deps }, [index, onValueChange]); return ( @@ -285,6 +287,7 @@ export const BreadCrumbEllipsis = forwardRef< const arr = [...prev, index]; return arr.sort((a, b) => Number(a) - Number(b)); }); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [index, onValueChange]); return ( ({ return [...(prev || []), fileWithPreview]; }); }, + // eslint-disable-next-line react-hooks/exhaustive-deps [reSelectAll] ); @@ -112,6 +113,7 @@ export function FileUploadCarouselProvider({ return newPreview; }); }, + // eslint-disable-next-line react-hooks/exhaustive-deps [emblaMainApi, activeIndex] ); @@ -129,6 +131,7 @@ export function FileUploadCarouselProvider({ dropzoneState.inputRef.current?.click(); } }, + // eslint-disable-next-line react-hooks/exhaustive-deps [emblaMainApi, activeIndex, removeImageFromPreview] ); @@ -162,6 +165,7 @@ export function FileUploadCarouselProvider({ } } }, + // eslint-disable-next-line react-hooks/exhaustive-deps [reSelectAll] ); diff --git a/src/registry/default/extension/multi-select.tsx b/src/registry/default/extension/multi-select.tsx index bfc9e0b..28b61d1 100644 --- a/src/registry/default/extension/multi-select.tsx +++ b/src/registry/default/extension/multi-select.tsx @@ -67,6 +67,7 @@ const MultiSelector = ({ onValueChange([...value, val]); } }, + // eslint-disable-next-line react-hooks/exhaustive-deps [value] ); @@ -120,6 +121,7 @@ const MultiSelector = ({ } } }, + // eslint-disable-next-line react-hooks/exhaustive-deps [value, inputValue, activeIndex, loop] ); diff --git a/src/registry/default/extension/tree-view-api.tsx b/src/registry/default/extension/tree-view-api.tsx index 1baa7ef..3317f69 100644 --- a/src/registry/default/extension/tree-view-api.tsx +++ b/src/registry/default/extension/tree-view-api.tsx @@ -134,6 +134,7 @@ const Tree = forwardRef( if (initialSelectedId) { expandSpecificTargetedElements(elements, initialSelectedId); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [initialSelectedId, elements]); const direction = dir === "rtl" ? "rtl" : "ltr"; @@ -355,10 +356,12 @@ const CollapseButton = forwardRef< }; elements.forEach(expandTree); + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); const closeAll = useCallback(() => { setExpendedItems?.([]); + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); useEffect(() => { @@ -366,6 +369,7 @@ const CollapseButton = forwardRef< if (expandAll) { expendAllTree(elements); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [expandAll]); return (