@progress/kendo-react-grid 5.5.0-dev.202206271315 → 5.5.0

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.
@@ -28,6 +28,8 @@ export declare class GridColumnMenuWrapper extends React.Component<GridColumnMen
28
28
  /** @hidden */
29
29
  blurTimeout: any;
30
30
  /** @hidden */
31
+ willBlur: boolean;
32
+ /** @hidden */
31
33
  blur: () => void;
32
34
  /** @hidden */
33
35
  focus: () => void;
@@ -35,5 +37,7 @@ export declare class GridColumnMenuWrapper extends React.Component<GridColumnMen
35
37
  anchorClick: () => void;
36
38
  /** @hidden */
37
39
  closeMenu: () => void;
40
+ /** @hidden */
41
+ onAnchorMouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
38
42
  render(): JSX.Element;
39
43
  }
@@ -55,7 +55,13 @@ var GridColumnMenuWrapper = /** @class */ (function (_super) {
55
55
  /** @hidden */
56
56
  _this.blurTimeout = undefined;
57
57
  /** @hidden */
58
+ _this.willBlur = false;
59
+ /** @hidden */
58
60
  _this.blur = function () {
61
+ if (_this.willBlur) {
62
+ _this.willBlur = false;
63
+ return;
64
+ }
59
65
  clearTimeout(_this.blurTimeout);
60
66
  _this.blurTimeout = window.setTimeout(function () { _this.closeMenu(); });
61
67
  };
@@ -71,13 +77,17 @@ var GridColumnMenuWrapper = /** @class */ (function (_super) {
71
77
  _this.closeMenu = function () {
72
78
  _this.setState({ show: false });
73
79
  };
80
+ /** @hidden */
81
+ _this.onAnchorMouseDown = function (event) {
82
+ _this.willBlur = _this.state.show && event.currentTarget === _this._anchor;
83
+ };
74
84
  return _this;
75
85
  }
76
86
  GridColumnMenuWrapper.prototype.render = function () {
77
87
  var _this = this;
78
88
  var _a = this.props, ColumnMenu = _a.columnMenu, others = __rest(_a, ["columnMenu"]);
79
89
  return (React.createElement(React.Fragment, null,
80
- React.createElement("div", { className: 'k-grid-column-menu k-grid-filter', ref: function (e) { return _this._anchor = e; }, onClick: this.anchorClick },
90
+ React.createElement("div", { className: 'k-grid-column-menu k-grid-filter', ref: function (e) { return _this._anchor = e; }, onClick: this.anchorClick, onMouseDown: this.onAnchorMouseDown },
81
91
  React.createElement("span", { className: 'k-icon k-i-more-vertical' })),
82
92
  React.createElement(Popup, { anchor: this._anchor, show: this.state.show },
83
93
  React.createElement("div", { ref: function (e) { return _this._content = e; }, className: 'k-grid-columnmenu-popup', tabIndex: 0, onBlur: this.blur, onFocus: this.focus, style: { outline: 'none' } }, ColumnMenu && (React.createElement(ColumnMenu, __assign({}, others, { onCloseMenu: this.closeMenu })))))));
@@ -92,11 +92,15 @@ var FilterRow = /** @class */ (function (_super) {
92
92
  var filterType = getFilterType(column.filter);
93
93
  var currentActiveFilter = activeFilter(column.field);
94
94
  var ariaLabel = column.filterable ? intl.toLanguageString(filterAriaLabel, messages[filterAriaLabel]) : undefined;
95
+ var value = currentActiveFilter && currentActiveFilter.value;
96
+ if (value === undefined) {
97
+ value = filterType === 'text' ? '' : null;
98
+ }
95
99
  var filterCellProps = column.filterable && {
96
100
  render: _this.props.cellRender,
97
101
  field: column.field,
98
102
  title: column.filterTitle,
99
- value: currentActiveFilter ? currentActiveFilter.value : filterType === 'text' ? '' : null,
103
+ value: value,
100
104
  operator: currentActiveFilter && currentActiveFilter.operator,
101
105
  operators: operatorMap(_this.props.filterOperators[filterType] || [], intl),
102
106
  booleanValues: operatorMap(booleanFilterValues, intl),
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-grid',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1656335065,
8
+ publishDate: 1656667970,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
11
11
  };
@@ -28,6 +28,8 @@ export declare class GridColumnMenuWrapper extends React.Component<GridColumnMen
28
28
  /** @hidden */
29
29
  blurTimeout: any;
30
30
  /** @hidden */
31
+ willBlur: boolean;
32
+ /** @hidden */
31
33
  blur: () => void;
32
34
  /** @hidden */
33
35
  focus: () => void;
@@ -35,5 +37,7 @@ export declare class GridColumnMenuWrapper extends React.Component<GridColumnMen
35
37
  anchorClick: () => void;
36
38
  /** @hidden */
37
39
  closeMenu: () => void;
40
+ /** @hidden */
41
+ onAnchorMouseDown: (event: React.MouseEvent<HTMLDivElement>) => void;
38
42
  render(): JSX.Element;
39
43
  }
@@ -58,7 +58,13 @@ var GridColumnMenuWrapper = /** @class */ (function (_super) {
58
58
  /** @hidden */
59
59
  _this.blurTimeout = undefined;
60
60
  /** @hidden */
61
+ _this.willBlur = false;
62
+ /** @hidden */
61
63
  _this.blur = function () {
64
+ if (_this.willBlur) {
65
+ _this.willBlur = false;
66
+ return;
67
+ }
62
68
  clearTimeout(_this.blurTimeout);
63
69
  _this.blurTimeout = window.setTimeout(function () { _this.closeMenu(); });
64
70
  };
@@ -74,13 +80,17 @@ var GridColumnMenuWrapper = /** @class */ (function (_super) {
74
80
  _this.closeMenu = function () {
75
81
  _this.setState({ show: false });
76
82
  };
83
+ /** @hidden */
84
+ _this.onAnchorMouseDown = function (event) {
85
+ _this.willBlur = _this.state.show && event.currentTarget === _this._anchor;
86
+ };
77
87
  return _this;
78
88
  }
79
89
  GridColumnMenuWrapper.prototype.render = function () {
80
90
  var _this = this;
81
91
  var _a = this.props, ColumnMenu = _a.columnMenu, others = __rest(_a, ["columnMenu"]);
82
92
  return (React.createElement(React.Fragment, null,
83
- React.createElement("div", { className: 'k-grid-column-menu k-grid-filter', ref: function (e) { return _this._anchor = e; }, onClick: this.anchorClick },
93
+ React.createElement("div", { className: 'k-grid-column-menu k-grid-filter', ref: function (e) { return _this._anchor = e; }, onClick: this.anchorClick, onMouseDown: this.onAnchorMouseDown },
84
94
  React.createElement("span", { className: 'k-icon k-i-more-vertical' })),
85
95
  React.createElement(kendo_react_popup_1.Popup, { anchor: this._anchor, show: this.state.show },
86
96
  React.createElement("div", { ref: function (e) { return _this._content = e; }, className: 'k-grid-columnmenu-popup', tabIndex: 0, onBlur: this.blur, onFocus: this.focus, style: { outline: 'none' } }, ColumnMenu && (React.createElement(ColumnMenu, __assign({}, others, { onCloseMenu: this.closeMenu })))))));
@@ -95,11 +95,15 @@ var FilterRow = /** @class */ (function (_super) {
95
95
  var filterType = (0, filterCommon_1.getFilterType)(column.filter);
96
96
  var currentActiveFilter = activeFilter(column.field);
97
97
  var ariaLabel = column.filterable ? intl.toLanguageString(messages_1.filterAriaLabel, messages_1.messages[messages_1.filterAriaLabel]) : undefined;
98
+ var value = currentActiveFilter && currentActiveFilter.value;
99
+ if (value === undefined) {
100
+ value = filterType === 'text' ? '' : null;
101
+ }
98
102
  var filterCellProps = column.filterable && {
99
103
  render: _this.props.cellRender,
100
104
  field: column.field,
101
105
  title: column.filterTitle,
102
- value: currentActiveFilter ? currentActiveFilter.value : filterType === 'text' ? '' : null,
106
+ value: value,
103
107
  operator: currentActiveFilter && currentActiveFilter.operator,
104
108
  operators: (0, filterCommon_1.operatorMap)(_this.props.filterOperators[filterType] || [], intl),
105
109
  booleanValues: (0, filterCommon_1.operatorMap)(filterCommon_1.booleanFilterValues, intl),
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-react-grid',
9
9
  productName: 'KendoReact',
10
10
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
11
- publishDate: 1656335065,
11
+ publishDate: 1656667970,
12
12
  version: '',
13
13
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
14
14
  };