@trackunit/react-components 1.24.2 → 1.24.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -11513,12 +11513,15 @@ const useContainerBreakpoints = (ref, options = {}) => {
11513
11513
  const { skip = false } = options;
11514
11514
  const [containerSize, setContainerSize] = react.useState(() => defaultBreakpointState);
11515
11515
  react.useEffect(() => {
11516
+ if (skip) {
11517
+ return;
11518
+ }
11516
11519
  if (process.env.NODE_ENV === "development" && !ref.current) {
11517
11520
  // eslint-disable-next-line no-console
11518
11521
  console.warn("useContainerBreakpoints: The provided ref is not attached to any element. " +
11519
11522
  "Make sure to pass the ref to an element using the ref prop, like: <div ref={myRef}>", "\nComponent:", ref.current);
11520
11523
  }
11521
- }, [ref]);
11524
+ }, [ref, skip]);
11522
11525
  const updateContainerSize = react.useCallback(() => {
11523
11526
  if (!ref.current) {
11524
11527
  return;
package/index.esm.js CHANGED
@@ -11511,12 +11511,15 @@ const useContainerBreakpoints = (ref, options = {}) => {
11511
11511
  const { skip = false } = options;
11512
11512
  const [containerSize, setContainerSize] = useState(() => defaultBreakpointState);
11513
11513
  useEffect(() => {
11514
+ if (skip) {
11515
+ return;
11516
+ }
11514
11517
  if (process.env.NODE_ENV === "development" && !ref.current) {
11515
11518
  // eslint-disable-next-line no-console
11516
11519
  console.warn("useContainerBreakpoints: The provided ref is not attached to any element. " +
11517
11520
  "Make sure to pass the ref to an element using the ref prop, like: <div ref={myRef}>", "\nComponent:", ref.current);
11518
11521
  }
11519
- }, [ref]);
11522
+ }, [ref, skip]);
11520
11523
  const updateContainerSize = useCallback(() => {
11521
11524
  if (!ref.current) {
11522
11525
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "1.24.2",
3
+ "version": "1.24.3",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "migrations": "./migrations.json",