@sheinx/base 3.9.3-beta.11 → 3.9.3-beta.12

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.
@@ -382,9 +382,9 @@ function Table(props) {
382
382
  return {
383
383
  width: width,
384
384
  borderSpacing: 0,
385
- tableLayout: isVirtualColumnEnabled ? 'initial' : 'fixed'
385
+ tableLayout: 'fixed'
386
386
  };
387
- }, [width, isVirtualColumnEnabled]);
387
+ }, [width]);
388
388
  var renderTable = function renderTable() {
389
389
  var _props$summary, _sticky$top, _props$data2;
390
390
  var Group = /*#__PURE__*/(0, _jsxRuntime.jsx)(_colgroup.default, {
@@ -1 +1 @@
1
- {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["tree.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAA4B,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAQxC,QAAA,MAAM,IAAI,wHAgTT,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["tree.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAA4B,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAQxC,QAAA,MAAM,IAAI,wHA8ST,CAAC;AAEF,eAAe,IAAI,CAAC"}
package/cjs/tree/tree.js CHANGED
@@ -305,12 +305,6 @@ var Tree = function Tree(props) {
305
305
  if (getDatum) getDatum(datum);
306
306
  context.mounted = true;
307
307
  }, []);
308
- var providerValue = (0, _react.useMemo)(function () {
309
- return _objectSpread(_objectSpread({}, datum), {}, {
310
- size: props.size,
311
- leafIcon: leafIcon
312
- });
313
- }, [datum, props.size, leafIcon]);
314
308
  var _useContext = (0, _react.useContext)(_formFieldContext.FormFieldContext),
315
309
  fieldId = _useContext.fieldId;
316
310
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({
@@ -319,7 +313,10 @@ var Tree = function Tree(props) {
319
313
  id: fieldId
320
314
  }, rest), {}, {
321
315
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_treeContext.Provider, {
322
- value: providerValue,
316
+ value: _objectSpread(_objectSpread({}, datum), {}, {
317
+ size: props.size,
318
+ leafIcon: leafIcon
319
+ }),
323
320
  children: renderList()
324
321
  })
325
322
  }));
@@ -375,9 +375,9 @@ export default function Table(props) {
375
375
  return {
376
376
  width: width,
377
377
  borderSpacing: 0,
378
- tableLayout: isVirtualColumnEnabled ? 'initial' : 'fixed'
378
+ tableLayout: 'fixed'
379
379
  };
380
- }, [width, isVirtualColumnEnabled]);
380
+ }, [width]);
381
381
  var renderTable = function renderTable() {
382
382
  var _props$summary, _sticky$top, _props$data2;
383
383
  var Group = /*#__PURE__*/_jsx(Colgroup, {
@@ -1 +1 @@
1
- {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["tree.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAA4B,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAQxC,QAAA,MAAM,IAAI,wHAgTT,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["tree.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAA4B,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAQxC,QAAA,MAAM,IAAI,wHA8ST,CAAC;AAEF,eAAe,IAAI,CAAC"}
package/esm/tree/tree.js CHANGED
@@ -17,7 +17,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
17
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
19
19
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
20
- import { useContext, useEffect, useMemo, useRef, useState } from 'react';
20
+ import { useContext, useEffect, useRef, useState } from 'react';
21
21
  import classNames from 'classnames';
22
22
  import { useTree, util } from '@sheinx/hooks';
23
23
  import RootTree from "./tree-root";
@@ -298,12 +298,6 @@ var Tree = function Tree(props) {
298
298
  if (getDatum) getDatum(datum);
299
299
  context.mounted = true;
300
300
  }, []);
301
- var providerValue = useMemo(function () {
302
- return _objectSpread(_objectSpread({}, datum), {}, {
303
- size: props.size,
304
- leafIcon: leafIcon
305
- });
306
- }, [datum, props.size, leafIcon]);
307
301
  var _useContext = useContext(FormFieldContext),
308
302
  fieldId = _useContext.fieldId;
309
303
  return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({
@@ -312,7 +306,10 @@ var Tree = function Tree(props) {
312
306
  id: fieldId
313
307
  }, rest), {}, {
314
308
  children: /*#__PURE__*/_jsx(Provider, {
315
- value: providerValue,
309
+ value: _objectSpread(_objectSpread({}, datum), {}, {
310
+ size: props.size,
311
+ leafIcon: leafIcon
312
+ }),
316
313
  children: renderList()
317
314
  })
318
315
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.9.3-beta.11",
3
+ "version": "3.9.3-beta.12",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "module": "./esm/index.js",
11
11
  "typings": "./cjs/index.d.ts",
12
12
  "dependencies": {
13
- "@sheinx/hooks": "3.9.3-beta.11",
13
+ "@sheinx/hooks": "3.9.3-beta.12",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.3.3"