arengibook 3.0.9-main → 3.1.0-main
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.
- package/dist/index.js +16 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49677,10 +49677,12 @@ var TreeSelectBodyCell = function TreeSelectBodyCell(_ref0) {
|
|
|
49677
49677
|
}, [isRowEditing]);
|
|
49678
49678
|
var handleChange = function handleChange(e) {
|
|
49679
49679
|
var val = e.value;
|
|
49680
|
-
|
|
49681
|
-
|
|
49682
|
-
|
|
49683
|
-
|
|
49680
|
+
// Permettre null pour le vidage explicite (showClear)
|
|
49681
|
+
var isEmpty = val !== null && val !== undefined && val !== '' && _typeof$g(val) === 'object' && Object.keys(val).length === 0;
|
|
49682
|
+
if (isEmpty) return;
|
|
49683
|
+
setEditValue(val !== null && val !== void 0 ? val : null);
|
|
49684
|
+
setSavedValue(val !== null && val !== void 0 ? val : null);
|
|
49685
|
+
onSave(val !== null && val !== void 0 ? val : null);
|
|
49684
49686
|
};
|
|
49685
49687
|
useEffect(function () {
|
|
49686
49688
|
if (!editing || isRowEditing) return;
|
|
@@ -49710,6 +49712,7 @@ var TreeSelectBodyCell = function TreeSelectBodyCell(_ref0) {
|
|
|
49710
49712
|
filter: (_col$filter = col.filter) !== null && _col$filter !== void 0 ? _col$filter : false,
|
|
49711
49713
|
display: (_col$display = col.display) !== null && _col$display !== void 0 ? _col$display : 'comma',
|
|
49712
49714
|
nodeColorField: (_col$nodeColorField = col.nodeColorField) !== null && _col$nodeColorField !== void 0 ? _col$nodeColorField : null,
|
|
49715
|
+
showClear: true,
|
|
49713
49716
|
style: {
|
|
49714
49717
|
width: '100%'
|
|
49715
49718
|
},
|
|
@@ -49994,12 +49997,13 @@ var SelfEditableCell = function SelfEditableCell(_ref11) {
|
|
|
49994
49997
|
options: col.options,
|
|
49995
49998
|
onChange: function onChange(e) {
|
|
49996
49999
|
var _col$options$find, _col$options;
|
|
49997
|
-
return commit(isObjModeSelect ? (_col$options$find = (_col$options = col.options) === null || _col$options === void 0 ? void 0 : _col$options.find(function (o) {
|
|
50000
|
+
return commit(e.value == null ? null : isObjModeSelect ? (_col$options$find = (_col$options = col.options) === null || _col$options === void 0 ? void 0 : _col$options.find(function (o) {
|
|
49998
50001
|
return o.value === e.value;
|
|
49999
50002
|
})) !== null && _col$options$find !== void 0 ? _col$options$find : {
|
|
50000
50003
|
value: e.value
|
|
50001
50004
|
} : e.value);
|
|
50002
50005
|
},
|
|
50006
|
+
showClear: true,
|
|
50003
50007
|
withColor: true,
|
|
50004
50008
|
autoFocus: true
|
|
50005
50009
|
})));
|
|
@@ -50040,7 +50044,8 @@ var SelfEditableCell = function SelfEditableCell(_ref11) {
|
|
|
50040
50044
|
},
|
|
50041
50045
|
onHide: function onHide() {
|
|
50042
50046
|
return commit(localValueRef.current);
|
|
50043
|
-
}
|
|
50047
|
+
},
|
|
50048
|
+
showClear: true
|
|
50044
50049
|
})));
|
|
50045
50050
|
}
|
|
50046
50051
|
case 'date':
|
|
@@ -50072,8 +50077,11 @@ var SelfEditableCell = function SelfEditableCell(_ref11) {
|
|
|
50072
50077
|
ref: containerRef
|
|
50073
50078
|
}, /*#__PURE__*/React__default.createElement(DatePicker, {
|
|
50074
50079
|
value: dateObj,
|
|
50075
|
-
onSelect: function onSelect(date) {
|
|
50076
|
-
if (
|
|
50080
|
+
onSelect: function onSelect(date, meta) {
|
|
50081
|
+
if ((meta === null || meta === void 0 ? void 0 : meta.type) === 'clear') {
|
|
50082
|
+
daySelectedRef.current = true;
|
|
50083
|
+
commit(null);
|
|
50084
|
+
} else if (date) {
|
|
50077
50085
|
daySelectedRef.current = true;
|
|
50078
50086
|
commit(fmtDate(date));
|
|
50079
50087
|
}
|