@progress/kendo-react-grid 6.0.2 → 6.0.3-dev.202310161425
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/cdn/js/kendo-react-grid.js +1 -1
- package/dist/es/cells/GridFilterCell.d.ts +1 -0
- package/dist/es/cells/GridFilterCell.js +12 -4
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/cells/GridFilterCell.d.ts +1 -0
- package/dist/npm/cells/GridFilterCell.js +12 -4
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-grid.js +1 -1
- package/package.json +18 -18
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridFilterCellProps } from '../interfaces/GridFilterCellProps';
|
|
3
3
|
export declare class GridFilterCell extends React.Component<GridFilterCellProps, {}> {
|
|
4
|
+
private _inputRef;
|
|
4
5
|
constructor(props: GridFilterCellProps);
|
|
5
6
|
/**
|
|
6
7
|
* @hidden
|
|
@@ -27,6 +27,7 @@ var GridFilterCell = /** @class */ (function (_super) {
|
|
|
27
27
|
__extends(GridFilterCell, _super);
|
|
28
28
|
function GridFilterCell(props) {
|
|
29
29
|
var _this = _super.call(this, props) || this;
|
|
30
|
+
_this._inputRef = React.createRef();
|
|
30
31
|
_this.renderOperatorEditor = function (localization) {
|
|
31
32
|
if (_this.props.filterType === 'boolean') {
|
|
32
33
|
return;
|
|
@@ -72,20 +73,27 @@ var GridFilterCell = /** @class */ (function (_super) {
|
|
|
72
73
|
cellBoolDropdownChange(event, this.props.onChange);
|
|
73
74
|
};
|
|
74
75
|
GridFilterCell.prototype.clear = function (e) {
|
|
76
|
+
var _this = this;
|
|
75
77
|
e.preventDefault();
|
|
76
78
|
this.props.onChange({ value: '', operator: '', syntheticEvent: e });
|
|
79
|
+
if (this._inputRef.current) {
|
|
80
|
+
this._inputRef.current.element.value = '';
|
|
81
|
+
setTimeout(function () {
|
|
82
|
+
_this._inputRef.current.element.focus();
|
|
83
|
+
}, 0);
|
|
84
|
+
}
|
|
77
85
|
};
|
|
78
86
|
GridFilterCell.prototype.filterComponent = function (filterType, value, booleanValues) {
|
|
79
87
|
var _this = this;
|
|
80
88
|
switch (filterType) {
|
|
81
89
|
case 'numeric':
|
|
82
|
-
return (React.createElement(NumericTextBox, { size: this.props.size, value: value, onChange: function (e) { _this.inputChange(e.value, e.syntheticEvent); }, title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
90
|
+
return (React.createElement(NumericTextBox, { ref: this._inputRef, size: this.props.size, value: value, onChange: function (e) { _this.inputChange(e.value, e.syntheticEvent); }, title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
83
91
|
case 'date':
|
|
84
|
-
return (React.createElement(DatePicker, { size: this.props.size, value: value, onChange: function (e) { _this.inputChange(e.value, e.syntheticEvent); }, title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
92
|
+
return (React.createElement(DatePicker, { ref: this._inputRef, size: this.props.size, value: value, onChange: function (e) { _this.inputChange(e.value, e.syntheticEvent); }, title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
85
93
|
case 'boolean':
|
|
86
94
|
var noFilterSet_1 = function (filter) { return filter === null || filter === undefined; };
|
|
87
|
-
return (React.createElement(DropDownList, { size: this.props.size, onChange: this.boolDropdownChange, value: booleanValues.find(function (item) { return item.operator === (noFilterSet_1(value) ? '' : value); }), data: booleanValues, textField: "text", title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
88
|
-
default: return (React.createElement(TextBox, { size: this.props.size, value: value || '', onChange: function (e) { _this.inputChange(e.target.value, e.syntheticEvent); }, title: this.props.title, "aria-label": this.props.ariaLabel }));
|
|
95
|
+
return (React.createElement(DropDownList, { ref: this._inputRef, size: this.props.size, onChange: this.boolDropdownChange, value: booleanValues.find(function (item) { return item.operator === (noFilterSet_1(value) ? '' : value); }), data: booleanValues, textField: "text", title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
96
|
+
default: return (React.createElement(TextBox, { ref: this._inputRef, size: this.props.size, value: value || '', onChange: function (e) { _this.inputChange(e.target.value, e.syntheticEvent); }, title: this.props.title, "aria-label": this.props.ariaLabel }));
|
|
89
97
|
}
|
|
90
98
|
};
|
|
91
99
|
return GridFilterCell;
|
|
@@ -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:
|
|
8
|
+
publishDate: 1697464714,
|
|
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
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridFilterCellProps } from '../interfaces/GridFilterCellProps';
|
|
3
3
|
export declare class GridFilterCell extends React.Component<GridFilterCellProps, {}> {
|
|
4
|
+
private _inputRef;
|
|
4
5
|
constructor(props: GridFilterCellProps);
|
|
5
6
|
/**
|
|
6
7
|
* @hidden
|
|
@@ -30,6 +30,7 @@ var GridFilterCell = /** @class */ (function (_super) {
|
|
|
30
30
|
__extends(GridFilterCell, _super);
|
|
31
31
|
function GridFilterCell(props) {
|
|
32
32
|
var _this = _super.call(this, props) || this;
|
|
33
|
+
_this._inputRef = React.createRef();
|
|
33
34
|
_this.renderOperatorEditor = function (localization) {
|
|
34
35
|
if (_this.props.filterType === 'boolean') {
|
|
35
36
|
return;
|
|
@@ -75,20 +76,27 @@ var GridFilterCell = /** @class */ (function (_super) {
|
|
|
75
76
|
(0, filterCommon_1.cellBoolDropdownChange)(event, this.props.onChange);
|
|
76
77
|
};
|
|
77
78
|
GridFilterCell.prototype.clear = function (e) {
|
|
79
|
+
var _this = this;
|
|
78
80
|
e.preventDefault();
|
|
79
81
|
this.props.onChange({ value: '', operator: '', syntheticEvent: e });
|
|
82
|
+
if (this._inputRef.current) {
|
|
83
|
+
this._inputRef.current.element.value = '';
|
|
84
|
+
setTimeout(function () {
|
|
85
|
+
_this._inputRef.current.element.focus();
|
|
86
|
+
}, 0);
|
|
87
|
+
}
|
|
80
88
|
};
|
|
81
89
|
GridFilterCell.prototype.filterComponent = function (filterType, value, booleanValues) {
|
|
82
90
|
var _this = this;
|
|
83
91
|
switch (filterType) {
|
|
84
92
|
case 'numeric':
|
|
85
|
-
return (React.createElement(kendo_react_inputs_1.NumericTextBox, { size: this.props.size, value: value, onChange: function (e) { _this.inputChange(e.value, e.syntheticEvent); }, title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
93
|
+
return (React.createElement(kendo_react_inputs_1.NumericTextBox, { ref: this._inputRef, size: this.props.size, value: value, onChange: function (e) { _this.inputChange(e.value, e.syntheticEvent); }, title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
86
94
|
case 'date':
|
|
87
|
-
return (React.createElement(kendo_react_dateinputs_1.DatePicker, { size: this.props.size, value: value, onChange: function (e) { _this.inputChange(e.value, e.syntheticEvent); }, title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
95
|
+
return (React.createElement(kendo_react_dateinputs_1.DatePicker, { ref: this._inputRef, size: this.props.size, value: value, onChange: function (e) { _this.inputChange(e.value, e.syntheticEvent); }, title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
88
96
|
case 'boolean':
|
|
89
97
|
var noFilterSet_1 = function (filter) { return filter === null || filter === undefined; };
|
|
90
|
-
return (React.createElement(kendo_react_dropdowns_1.DropDownList, { size: this.props.size, onChange: this.boolDropdownChange, value: booleanValues.find(function (item) { return item.operator === (noFilterSet_1(value) ? '' : value); }), data: booleanValues, textField: "text", title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
91
|
-
default: return (React.createElement(kendo_react_inputs_1.TextBox, { size: this.props.size, value: value || '', onChange: function (e) { _this.inputChange(e.target.value, e.syntheticEvent); }, title: this.props.title, "aria-label": this.props.ariaLabel }));
|
|
98
|
+
return (React.createElement(kendo_react_dropdowns_1.DropDownList, { ref: this._inputRef, size: this.props.size, onChange: this.boolDropdownChange, value: booleanValues.find(function (item) { return item.operator === (noFilterSet_1(value) ? '' : value); }), data: booleanValues, textField: "text", title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
99
|
+
default: return (React.createElement(kendo_react_inputs_1.TextBox, { ref: this._inputRef, size: this.props.size, value: value || '', onChange: function (e) { _this.inputChange(e.target.value, e.syntheticEvent); }, title: this.props.title, "aria-label": this.props.ariaLabel }));
|
|
92
100
|
}
|
|
93
101
|
};
|
|
94
102
|
return GridFilterCell;
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-grid',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1697464714,
|
|
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
|
};
|