@seafile/seafile-calendar 0.0.31-Apph0.59 → 0.0.31-Apph0.61

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.
@@ -3081,8 +3081,12 @@ var _initialiseProps = function _initialiseProps() {
3081
3081
  }
3082
3082
  };
3083
3083
 
3084
- this.onClear = function () {
3085
- _this2.onSelect(null);
3084
+ this.onClear = function (value, shouldDisplayCurrent) {
3085
+ if (shouldDisplayCurrent) {
3086
+ _this2.onSelect(value || __WEBPACK_IMPORTED_MODULE_9_dayjs___default()());
3087
+ } else {
3088
+ _this2.onSelect(null);
3089
+ }
3086
3090
  _this2.props.onClear();
3087
3091
  _this2.setState({ currentStatus: 1 });
3088
3092
  };
@@ -7420,15 +7424,14 @@ var _initialiseProps = function _initialiseProps() {
7420
7424
  onChange = _props.onChange,
7421
7425
  selectedValue = _props.selectedValue,
7422
7426
  shouldDisplayCurrent = _props.shouldDisplayCurrent,
7423
- openValue = _props.openValue,
7424
- onClear = _props.onClear;
7427
+ openValue = _props.openValue;
7425
7428
 
7426
7429
  console.log('openValue', openValue);
7427
7430
  // 没有内容,合法并直接退出
7428
7431
  if (!str || !calendarStr) {
7429
7432
  if (shouldDisplayCurrent) {
7430
7433
  _this2.setState({ str: '' });
7431
- onClear(openValue);
7434
+ _this2.props.onClear(openValue, shouldDisplayCurrent);
7432
7435
  return;
7433
7436
  }
7434
7437
  _this2.onClear();