@kep-platform/basic-component 0.0.21 → 0.0.23

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.
@@ -10,7 +10,7 @@ export type ColumnsProps = {
10
10
  } & HtmlHTMLAttributes<HTMLUListElement>;
11
11
  export declare const Column: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<import("styled-components").FastOmit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>, "ref"> & {
12
12
  ref?: ((instance: HTMLLIElement | null) => void) | React.RefObject<HTMLLIElement> | null | undefined;
13
- }, Omit<ColumnType, "dataIndex" | "render"> & {
13
+ }, Omit<ColumnType, "render" | "dataIndex"> & {
14
14
  key: React.Key;
15
15
  title?: React.ReactNode;
16
16
  index?: number | undefined;
@@ -226,7 +226,7 @@ export default function Table(_ref3) {
226
226
  } else {
227
227
  return element;
228
228
  }
229
- }))))), dataSource.length === 0 ? empty : /*#__PURE__*/React.createElement(TableContent, {
229
+ }))))), /*#__PURE__*/React.createElement(TableContent, {
230
230
  onScroll: function onScroll(e) {
231
231
  var tableContainer = e.target;
232
232
  if (boxShadowBox.current) {
@@ -249,7 +249,7 @@ export default function Table(_ref3) {
249
249
  columns: headerColumns,
250
250
  rowData: titleRowData,
251
251
  isFlex: !scroll
252
- }), /*#__PURE__*/React.createElement(TableBody, {
252
+ }), dataSource.length > 0 ? /*#__PURE__*/React.createElement(TableBody, {
253
253
  direction: "column"
254
254
  }, formatedDataSource.map(function (rowData, index) {
255
255
  if (rowData) return /*#__PURE__*/React.createElement(TableBodyRow, {
@@ -260,7 +260,7 @@ export default function Table(_ref3) {
260
260
  columns: columns,
261
261
  isFlex: !scroll
262
262
  }));else return undefined;
263
- }))), /*#__PURE__*/React.createElement("br", null), pagination !== false && dataSource.length !== 0 && /*#__PURE__*/React.createElement(Pagination, _extends({}, pagination, {
263
+ })) : empty), pagination !== false && dataSource.length !== 0 && /*#__PURE__*/React.createElement(Pagination, _extends({}, pagination, {
264
264
  total: (pagination === null || pagination === void 0 ? void 0 : pagination.total) || dataSource.length,
265
265
  justifyContent: "right",
266
266
  onChange: function onChange(current, pageSize) {
@@ -163,6 +163,8 @@ export var TreeNodeController = function TreeNodeController(_ref) {
163
163
  });
164
164
  }, [onSelect, selectedKeys, multiple, selected]);
165
165
  var onClickExpandIconhandler = useCallback(function (e) {
166
+ e.preventDefault();
167
+ e.stopPropagation();
166
168
  if (expanded) {
167
169
  onExpand(expandedKeys.filter(function (key) {
168
170
  return key !== node[fieldNames.key];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kep-platform/basic-component",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "A react library developed with dumi",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -74,10 +74,10 @@
74
74
  "react-dom": "^18.0.0",
75
75
  "stylelint": "^14.9.1"
76
76
  },
77
- "gitHead": "52099c3504fd710771a1c9c6718824f064c8329a",
77
+ "gitHead": "a650530adba4ec45631c719e48dec7ed1696d3be",
78
78
  "dependencies": {
79
79
  "@ant-design/icons": "^5.3.7",
80
- "@kep-platform/hooks": "^0.0.21",
80
+ "@kep-platform/hooks": "^0.0.23",
81
81
  "color": "^4.2.3",
82
82
  "rc-pagination": "^4.1.0",
83
83
  "styled-components": "^6.1.11"