@lemon-fe/kits 1.0.0-122 → 1.0.0-123

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.
@@ -18,7 +18,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
18
18
 
19
19
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
20
 
21
- import React, { createContext, memo, useContext, useEffect, useId, useMemo, useState, Fragment } from 'react';
21
+ import { uniqueId } from 'lodash';
22
+ import React, { createContext, memo, useContext, useEffect, useMemo, useState, Fragment } from 'react';
22
23
  var Slot = /*#__PURE__*/memo(function Content(props) {
23
24
  var children = props.children;
24
25
  return /*#__PURE__*/React.createElement(React.Fragment, null, children);
@@ -166,7 +167,9 @@ function Portal(props) {
166
167
  var slot = props.slot,
167
168
  children = props.children;
168
169
  var portal = useContext(Context);
169
- var id = useId();
170
+ var id = useMemo(function () {
171
+ return uniqueId('slot');
172
+ }, []);
170
173
  useEffect(function () {
171
174
  return function () {
172
175
  portal.delete(slot, id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/kits",
3
- "version": "1.0.0-122",
3
+ "version": "1.0.0-123",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -38,7 +38,7 @@
38
38
  "@ag-grid-community/react": "29.2.0",
39
39
  "@ag-grid-community/styles": "29.2.0",
40
40
  "@ant-design/icons": "^4.7.0",
41
- "@lemon-fe/hooks": "^0.1.147",
41
+ "@lemon-fe/hooks": "^0.1.148",
42
42
  "@lemon-fe/utils": "^0.1.117",
43
43
  "antd": "4.24.8",
44
44
  "async-validator": "^4.2.5",