@lemon-fe/components 1.5.7-alpha.6 → 1.5.7-alpha.7

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.
@@ -17,7 +17,7 @@ declare const Editors: {
17
17
  Text: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("..").TextEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
18
18
  Date: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("..").DateEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
19
19
  Number: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("..").NumberEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
20
- Select: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "mode" | "virtual" | "allowClear" | "showSearch" | "optionFilterProp" | "options" | "listHeight"> & {
20
+ Select: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "allowClear" | "mode" | "showSearch" | "virtual" | "optionFilterProp" | "options" | "listHeight"> & {
21
21
  fieldNames?: {
22
22
  label: string;
23
23
  value: string;
@@ -106,6 +106,7 @@ export default function SiderTree(props) {
106
106
  var roots = [];
107
107
  mData.forEach(function (item) {
108
108
  var node = _objectSpread(_objectSpread({}, item), {}, {
109
+ children: [],
109
110
  data: item
110
111
  });
111
112
  nodesIndex.set(item.key, node);
@@ -126,7 +127,6 @@ export default function SiderTree(props) {
126
127
  if (node.parent !== undefined) {
127
128
  var parentNode = nodesIndex.get(node.parent);
128
129
  if (parentNode && (matchedNodes.has(parentNode) || filterKeepParents)) {
129
- parentNode.children = parentNode.children || [];
130
130
  parentNode.children.push(node);
131
131
  collectAncestors(parentNode);
132
132
  } else {
@@ -138,7 +138,6 @@ export default function SiderTree(props) {
138
138
  };
139
139
  var collectChildren = function collectChildren(node) {
140
140
  var children = childrenIndex.get(node.key) || [];
141
- node.children = node.children || [];
142
141
  children.forEach(function (child) {
143
142
  if (addedNodes.has(child.key)) {
144
143
  return;
@@ -9,7 +9,7 @@ export interface TreeData<T = string | number> extends Omit<DataNode, 'children'
9
9
 
10
10
  export type TreeNode<T> = Omit<TreeData<T>, 'title'> & {
11
11
  title?: ReactNode;
12
- children?: TreeNode<T>[];
12
+ children: TreeNode<T>[];
13
13
  data: TreeData<T>;
14
14
  };
15
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/components",
3
- "version": "1.5.7-alpha.6",
3
+ "version": "1.5.7-alpha.7",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "registry": "https://registry.npmjs.org"
60
60
  },
61
- "gitHead": "6d26b5ca998c1e9f0455db9dc97880d1aa147bac"
61
+ "gitHead": "101f32c5a6fd110b97e30e4e7f68631a02fd9151"
62
62
  }