@hi-ui/hiui 3.9.0-rc.13 → 3.9.0-rc.16
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.
|
@@ -137,12 +137,12 @@ var TimePicker = function TimePicker(_ref) {
|
|
|
137
137
|
|
|
138
138
|
if (type.includes('range')) {
|
|
139
139
|
returnDate = {
|
|
140
|
-
start: _dates[0].toDate(),
|
|
141
|
-
end: _dates[1].toDate()
|
|
140
|
+
start: _dates[0] ? _dates[0].toDate() : null,
|
|
141
|
+
end: _dates[1] ? _dates[1].toDate() : null
|
|
142
142
|
};
|
|
143
143
|
returnDateStr = {
|
|
144
|
-
start: _dates[0].format(iFormat),
|
|
145
|
-
end: _dates[1].format(iFormat)
|
|
144
|
+
start: _dates[0] ? _dates[0].format(iFormat) : '',
|
|
145
|
+
end: _dates[1] ? _dates[1].format(iFormat) : ''
|
|
146
146
|
};
|
|
147
147
|
} else {
|
|
148
148
|
returnDate = _dates[0].toDate();
|
package/es/modal/index.js
CHANGED
|
@@ -88,7 +88,7 @@ var InternalModalComp = function InternalModalComp(_ref) {
|
|
|
88
88
|
setCloseable = _useState2[1];
|
|
89
89
|
|
|
90
90
|
(0, _react.useEffect)(function () {
|
|
91
|
-
setCloseable(
|
|
91
|
+
setCloseable(propCloseable);
|
|
92
92
|
}, [propCloseable]);
|
|
93
93
|
var trapTabKey = (0, _react.useCallback)(function (e) {
|
|
94
94
|
// Find all focusable children
|
package/es/progress/index.d.ts
CHANGED
package/es/table/Row.js
CHANGED
|
@@ -141,7 +141,7 @@ var Row = function Row(_ref) {
|
|
|
141
141
|
});
|
|
142
142
|
dragKey !== rowKey && setDropHightLineStatus(clienY < startClientY ? 'top' : 'bottom');
|
|
143
143
|
}, [rowKey, dropHightLineStatus, draggable]);
|
|
144
|
-
var
|
|
144
|
+
var onRowProps = onRow(isAvgRow || isSumRow ? null : rowData, index);
|
|
145
145
|
return [/*#__PURE__*/_react["default"].createElement("tr", (0, _extends2["default"])({
|
|
146
146
|
style: isFixed && rowHeight ? {
|
|
147
147
|
height: rowHeight
|
|
@@ -149,7 +149,7 @@ var Row = function Row(_ref) {
|
|
|
149
149
|
ref: innerRef,
|
|
150
150
|
id: rowKey,
|
|
151
151
|
draggable: draggable
|
|
152
|
-
},
|
|
152
|
+
}, onRowProps, {
|
|
153
153
|
onMouseMove: function onMouseMove() {
|
|
154
154
|
setDragRowKey(null);
|
|
155
155
|
setDragStatus(false);
|
|
@@ -169,11 +169,9 @@ var Row = function Row(_ref) {
|
|
|
169
169
|
if (!draggable) return;
|
|
170
170
|
setDropHightLineStatus(null);
|
|
171
171
|
},
|
|
172
|
-
className: (0, _classnames["default"])("".concat(prefix, "__row"), (_classNames = {}, (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--error"), errorRowKeys.includes(rowData.key)), (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--highlight"), hoverRow === rowData.key || highlightedRowKeys.includes(rowData.key)), (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--total"), isSumRow), (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--draggable"), draggable), (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--draging"), draggable && dragRowKey === rowKey), (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--draggable__border--top"), draggable && typeof dargInfo.current.dropKey !== 'undefined' && dropHightLineStatus === 'top'), (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--draggable__border--bottom"), draggable && typeof dargInfo.current.dropKey !== 'undefined' && dropHightLineStatus === 'bottom'), (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--avg"), isAvgRow), _classNames)),
|
|
173
|
-
key: "row",
|
|
174
172
|
onDoubleClick: function onDoubleClick(e) {
|
|
175
|
-
if (
|
|
176
|
-
|
|
173
|
+
if (onRowProps && onRowProps.onDoubleClick) {
|
|
174
|
+
onRowProps.onDoubleClick(e);
|
|
177
175
|
}
|
|
178
176
|
|
|
179
177
|
if (highlightRowOnDoubleClick === false) {
|
|
@@ -187,7 +185,9 @@ var Row = function Row(_ref) {
|
|
|
187
185
|
} else {
|
|
188
186
|
setHighlightRows(highlightedRowKeys.concat(rowData.key));
|
|
189
187
|
}
|
|
190
|
-
}
|
|
188
|
+
},
|
|
189
|
+
className: (0, _classnames["default"])("".concat(prefix, "__row"), (_classNames = {}, (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--error"), errorRowKeys.includes(rowData.key)), (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--highlight"), hoverRow === rowData.key || highlightedRowKeys.includes(rowData.key)), (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--total"), isSumRow), (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--draggable"), draggable), (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--draging"), draggable && dragRowKey === rowKey), (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--draggable__border--top"), draggable && typeof dargInfo.current.dropKey !== 'undefined' && dropHightLineStatus === 'top'), (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--draggable__border--bottom"), draggable && typeof dargInfo.current.dropKey !== 'undefined' && dropHightLineStatus === 'bottom'), (0, _defineProperty2["default"])(_classNames, "".concat(prefix, "__row--avg"), isAvgRow), _classNames)),
|
|
190
|
+
key: "row"
|
|
191
191
|
}), rowSelection && isFixed !== 'right' && !isSumRow && !isAvgRow && /*#__PURE__*/_react["default"].createElement("td", {
|
|
192
192
|
style: {
|
|
193
193
|
width: checkboxColWidth
|
|
@@ -27,6 +27,8 @@ var useSelect = function useSelect(_ref) {
|
|
|
27
27
|
setSelectedId(selectedId);
|
|
28
28
|
}
|
|
29
29
|
}, [selectedId, selectable]);
|
|
30
|
+
var onSelectRef = (0, _react.useRef)(onSelect);
|
|
31
|
+
onSelectRef.current = onSelect;
|
|
30
32
|
var onSelectNode = (0, _react.useCallback)(function (selectedNode) {
|
|
31
33
|
if (!selectable) return; // 兼容老版本:全局开启了 selectable,子节点默认都支持 selectable
|
|
32
34
|
|
|
@@ -36,6 +38,8 @@ var useSelect = function useSelect(_ref) {
|
|
|
36
38
|
setSelectedId(selectedNode.id);
|
|
37
39
|
}
|
|
38
40
|
|
|
41
|
+
var onSelect = onSelectRef.current;
|
|
42
|
+
|
|
39
43
|
if (onSelect) {
|
|
40
44
|
onSelect(selectedNode);
|
|
41
45
|
}
|
package/package.json
CHANGED