@zhenliang/sheet 0.1.29 → 0.1.30

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.
@@ -63,7 +63,7 @@ export var getSelectEditor = function getSelectEditor(options) {
63
63
  onChange: handleChange,
64
64
  onKeyDown: handleKeyDown,
65
65
  options: customOptions,
66
- popupClassName: 'excelTablePopupClassName',
66
+ popupClassName: "select-editor-dropdown",
67
67
  dropdownRender: dropdown
68
68
  }));
69
69
  };
@@ -46,3 +46,7 @@
46
46
  font-size: 12px !important;
47
47
  }
48
48
  }
49
+
50
+ .select-editor-dropdown{
51
+ min-width: 80px !important;
52
+ }
@@ -16,7 +16,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
16
16
  import { Sheet, useSetState } from "../..";
17
17
  import { GroupContext } from "../../hooks/useGroupConfig";
18
18
  import { WidthContext } from "../../hooks/useWidthConfig";
19
- import { Button } from 'antd';
19
+ import { Button, ConfigProvider, Empty } from 'antd';
20
20
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
21
21
  import { SheetEvent } from "../sheet/Event";
22
22
  import { DraggableShell } from "../shell/draggableShell";
@@ -157,48 +157,55 @@ var Table = function Table(_ref) {
157
157
  }
158
158
  });
159
159
  }, [columns.length, draggable, headSelection, hasChildren]);
160
- return /*#__PURE__*/_jsx(WidthContext.Provider, {
161
- value: {
162
- widths: widths,
163
- onChange: setWidth
160
+ return /*#__PURE__*/_jsx(ConfigProvider, {
161
+ renderEmpty: function renderEmpty() {
162
+ return /*#__PURE__*/_jsx(Empty, {
163
+ image: Empty.PRESENTED_IMAGE_SIMPLE
164
+ });
164
165
  },
165
- children: /*#__PURE__*/_jsx(GroupContext.Provider, {
166
+ children: /*#__PURE__*/_jsx(WidthContext.Provider, {
166
167
  value: {
167
- config: rowGroupConfig,
168
- onChange: setGroupConfig
168
+ widths: widths,
169
+ onChange: setWidth
169
170
  },
170
- children: /*#__PURE__*/_jsxs(Sheet, _objectSpread(_objectSpread({}, args), {}, {
171
- sheetInstance: sheetInstance,
172
- sheetRenderer: WrappedTableShell,
173
- data: data,
174
- onCellsChanged: handleChanges,
175
- children: [/*#__PURE__*/_jsx(SelectionEvent, {
176
- hasChildren: hasChildren,
177
- rowSelection: rowSelection,
178
- onChange: handleRowSelect
179
- }), /*#__PURE__*/_jsx(GroupEvent, {
180
- hasChildren: hasChildren,
171
+ children: /*#__PURE__*/_jsx(GroupContext.Provider, {
172
+ value: {
173
+ config: rowGroupConfig,
174
+ onChange: setGroupConfig
175
+ },
176
+ children: /*#__PURE__*/_jsxs(Sheet, _objectSpread(_objectSpread({}, args), {}, {
177
+ sheetInstance: sheetInstance,
178
+ sheetRenderer: WrappedTableShell,
181
179
  data: data,
182
- sheetInstance: sheetInstance.current,
183
- onGridChange: setData
184
- }), /*#__PURE__*/_jsx(SheetEvent, {
185
- name: "reverse",
186
- handler: handleReverse
187
- }, "_reverse"), Object.keys(eventHandler || {}).map(function (key) {
188
- return /*#__PURE__*/_jsx(SheetEvent, {
189
- name: key,
190
- handler: eventHandler === null || eventHandler === void 0 ? void 0 : eventHandler[key]
191
- }, key);
192
- }), handleAdd ? /*#__PURE__*/_jsx(Button, {
193
- type: "dashed",
194
- style: {
195
- width: '100%',
196
- height: 32
197
- },
198
- onClick: handleAdd,
199
- children: "+ \u6DFB\u52A0"
200
- }) : null]
201
- }))
180
+ onCellsChanged: handleChanges,
181
+ children: [/*#__PURE__*/_jsx(SelectionEvent, {
182
+ hasChildren: hasChildren,
183
+ rowSelection: rowSelection,
184
+ onChange: handleRowSelect
185
+ }), /*#__PURE__*/_jsx(GroupEvent, {
186
+ hasChildren: hasChildren,
187
+ data: data,
188
+ sheetInstance: sheetInstance.current,
189
+ onGridChange: setData
190
+ }), /*#__PURE__*/_jsx(SheetEvent, {
191
+ name: "reverse",
192
+ handler: handleReverse
193
+ }, "_reverse"), Object.keys(eventHandler || {}).map(function (key) {
194
+ return /*#__PURE__*/_jsx(SheetEvent, {
195
+ name: key,
196
+ handler: eventHandler === null || eventHandler === void 0 ? void 0 : eventHandler[key]
197
+ }, key);
198
+ }), handleAdd ? /*#__PURE__*/_jsx(Button, {
199
+ type: "dashed",
200
+ style: {
201
+ width: '100%',
202
+ height: 32
203
+ },
204
+ onClick: handleAdd,
205
+ children: "+ \u6DFB\u52A0"
206
+ }) : null]
207
+ }))
208
+ })
202
209
  })
203
210
  });
204
211
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhenliang/sheet",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",