@atom-learning/components 8.0.2 → 8.0.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/dist/index.cjs.js CHANGED
@@ -1369,8 +1369,12 @@ var useCallbackRef = () => {
1369
1369
  };
1370
1370
  var useCallbackRefState = () => {
1371
1371
  const [elRef, setElRef] = react.useState(null);
1372
+ const hasElement = react.useRef(false);
1372
1373
  return [elRef, react.useCallback((el) => {
1373
- if (el) setElRef((prev) => prev === el ? prev : el);
1374
+ if (el && !hasElement.current) {
1375
+ hasElement.current = true;
1376
+ setElRef(el);
1377
+ }
1374
1378
  }, [])];
1375
1379
  };
1376
1380
  //#endregion