@progress/kendo-react-grid 5.10.0-dev.202301031638 → 5.10.0-dev.202301091032

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.
Files changed (65) hide show
  1. package/dist/cdn/js/kendo-react-grid.js +1 -1
  2. package/dist/es/Grid.d.ts +6 -0
  3. package/dist/es/Grid.js +71 -67
  4. package/dist/es/GridToolbar.js +5 -1
  5. package/dist/es/VirtualScroll.d.ts +2 -2
  6. package/dist/es/VirtualScroll.js +38 -30
  7. package/dist/es/cells/GridCell.js +1 -1
  8. package/dist/es/cells/GridDetailCell.js +1 -1
  9. package/dist/es/cells/GridDetailHierarchyCell.js +1 -1
  10. package/dist/es/cells/GridEditCell.js +1 -1
  11. package/dist/es/cells/GridFilterCell.js +8 -8
  12. package/dist/es/cells/GridGroupCell.js +3 -3
  13. package/dist/es/cells/GridHierarchyCell.js +3 -2
  14. package/dist/es/columnMenu/GridColumnMenuWrapper.d.ts +2 -2
  15. package/dist/es/columnMenu/GridColumnMenuWrapper.js +1 -1
  16. package/dist/es/drag/ColumnDraggable.js +1 -1
  17. package/dist/es/footer/Footer.d.ts +2 -0
  18. package/dist/es/footer/Footer.js +7 -3
  19. package/dist/es/footer/FooterRow.js +3 -2
  20. package/dist/es/header/FilterRow.d.ts +2 -1
  21. package/dist/es/header/FilterRow.js +4 -3
  22. package/dist/es/header/Header.d.ts +2 -0
  23. package/dist/es/header/Header.js +7 -4
  24. package/dist/es/header/HeaderRow.js +25 -31
  25. package/dist/es/interfaces/GridColumnProps.d.ts +1 -1
  26. package/dist/es/interfaces/GridFilterCellProps.d.ts +12 -0
  27. package/dist/es/interfaces/GridProps.d.ts +10 -0
  28. package/dist/es/interfaces/GridToolbarProps.d.ts +16 -0
  29. package/dist/es/package-metadata.js +1 -1
  30. package/dist/es/rows/GridRow.js +2 -2
  31. package/dist/es/utils/index.d.ts +8 -0
  32. package/dist/es/utils/index.js +9 -0
  33. package/dist/npm/Grid.d.ts +6 -0
  34. package/dist/npm/Grid.js +69 -65
  35. package/dist/npm/GridToolbar.js +5 -1
  36. package/dist/npm/VirtualScroll.d.ts +2 -2
  37. package/dist/npm/VirtualScroll.js +38 -30
  38. package/dist/npm/cells/GridCell.js +1 -1
  39. package/dist/npm/cells/GridDetailCell.js +1 -1
  40. package/dist/npm/cells/GridDetailHierarchyCell.js +1 -1
  41. package/dist/npm/cells/GridEditCell.js +1 -1
  42. package/dist/npm/cells/GridFilterCell.js +7 -7
  43. package/dist/npm/cells/GridGroupCell.js +3 -3
  44. package/dist/npm/cells/GridHierarchyCell.js +3 -2
  45. package/dist/npm/columnMenu/GridColumnMenuWrapper.d.ts +2 -2
  46. package/dist/npm/columnMenu/GridColumnMenuWrapper.js +1 -1
  47. package/dist/npm/drag/ColumnDraggable.js +1 -1
  48. package/dist/npm/footer/Footer.d.ts +2 -0
  49. package/dist/npm/footer/Footer.js +7 -3
  50. package/dist/npm/footer/FooterRow.js +3 -2
  51. package/dist/npm/header/FilterRow.d.ts +2 -1
  52. package/dist/npm/header/FilterRow.js +4 -3
  53. package/dist/npm/header/Header.d.ts +2 -0
  54. package/dist/npm/header/Header.js +6 -3
  55. package/dist/npm/header/HeaderRow.js +25 -31
  56. package/dist/npm/interfaces/GridColumnProps.d.ts +1 -1
  57. package/dist/npm/interfaces/GridFilterCellProps.d.ts +12 -0
  58. package/dist/npm/interfaces/GridProps.d.ts +10 -0
  59. package/dist/npm/interfaces/GridToolbarProps.d.ts +16 -0
  60. package/dist/npm/package-metadata.js +1 -1
  61. package/dist/npm/rows/GridRow.js +2 -2
  62. package/dist/npm/utils/index.d.ts +8 -0
  63. package/dist/npm/utils/index.js +10 -1
  64. package/dist/systemjs/kendo-react-grid.js +1 -1
  65. package/package.json +18 -18
package/dist/es/Grid.d.ts CHANGED
@@ -100,12 +100,14 @@ export declare class Grid extends React.Component<GridProps, {}> {
100
100
  onColumnReorder: PropTypes.Requireable<(...args: any[]) => any>;
101
101
  dataItemKey: PropTypes.Requireable<string>;
102
102
  navigatable: PropTypes.Requireable<boolean>;
103
+ size: PropTypes.Requireable<string>;
103
104
  };
104
105
  /** @hidden */
105
106
  static contextType: React.Context<TableKeyboardNavigationContextType | undefined>;
106
107
  protected dragLogic: CommonDragLogic;
107
108
  private _columns;
108
109
  private _columnsMap;
110
+ private _columnsMutations;
109
111
  private contextStateRef;
110
112
  private navigationStateRef;
111
113
  private _data;
@@ -221,7 +223,11 @@ export declare class Grid extends React.Component<GridProps, {}> {
221
223
  private columnToGroup;
222
224
  private resetTableWidth;
223
225
  private onResize;
226
+ private childrenToArray;
227
+ private readColumns;
228
+ private mapColumns;
224
229
  private initColumns;
230
+ private getHeaderRow;
225
231
  private resolveTitle;
226
232
  private getDataState;
227
233
  private getArguments;
package/dist/es/Grid.js CHANGED
@@ -35,7 +35,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
35
35
  };
36
36
  import * as React from 'react';
37
37
  import * as PropTypes from 'prop-types';
38
- import { dispatchEvent, classNames, getter, guid, setScrollbarWidth, canUseDOM } from '@progress/kendo-react-common';
38
+ import { dispatchEvent, classNames, getter, guid, setScrollbarWidth, canUseDOM, memoizeOne, kendoThemeMaps } from '@progress/kendo-react-common';
39
39
  import { tableColumnsVirtualization, Pager, mapColumns, isRtl, tableKeyboardNavigation, TableKeyboardNavigationContext, tableKeyboardNavigationScopeAttributes, tableKeyboardNavigationTools as navigationTools, tableKeyboardNavigationBodyAttributes, getSelectionOptions, TableSelection, DropClue, DragClue } from '@progress/kendo-react-data-tools';
40
40
  import { GridSelectionCell } from './cells/GridSelectionCell';
41
41
  import { GridHierarchyCell } from './cells/GridHierarchyCell';
@@ -48,7 +48,7 @@ import { Footer } from './footer/Footer';
48
48
  import { VirtualScroll } from './VirtualScroll';
49
49
  import { ColumnResize } from './drag/ColumnResize';
50
50
  import { CommonDragLogic } from './drag/CommonDragLogic';
51
- import { getNestedValue, flatData, readColumns, autoGenerateColumns, sanitizeColumns } from './utils/index';
51
+ import { getNestedValue, flatData, readColumns, autoGenerateColumns, firefox, firefoxMaxHeight, sanitizeColumns } from './utils/index';
52
52
  import { GridCell } from './cells/GridCell';
53
53
  import { GridGroupCell } from './cells/GridGroupCell';
54
54
  import { GridRow } from './rows/GridRow';
@@ -99,6 +99,7 @@ var Grid = /** @class */ (function (_super) {
99
99
  var _this = _super.call(this, props) || this;
100
100
  _this._columns = [];
101
101
  _this._columnsMap = [[]];
102
+ _this._columnsMutations = 0;
102
103
  _this.contextStateRef = { current: undefined };
103
104
  _this.navigationStateRef = { current: undefined };
104
105
  _this._data = [];
@@ -158,7 +159,7 @@ var Grid = /** @class */ (function (_super) {
158
159
  if (_this._footer) {
159
160
  _this._footer.setScrollLeft(scrollLeft);
160
161
  }
161
- if (_this.vs) {
162
+ if (_this.vs && scrollTop !== _this.wrapperScrollTop) {
162
163
  _this.vs.scrollHandler(event);
163
164
  }
164
165
  dispatchEvent(_this.props.onScroll, event, _this, undefined);
@@ -247,6 +248,7 @@ var Grid = /** @class */ (function (_super) {
247
248
  };
248
249
  _this.onResize = function (index, newWidth, oldWidth, nativeEvent, end, targetId) {
249
250
  _this.resetTableWidth();
251
+ _this._columnsMutations++;
250
252
  if (_this.props.onColumnResize) {
251
253
  _this.props.onColumnResize.call(undefined, {
252
254
  columns: _this.columns,
@@ -260,6 +262,19 @@ var Grid = /** @class */ (function (_super) {
260
262
  });
261
263
  }
262
264
  };
265
+ _this.childrenToArray = memoizeOne(function (children) {
266
+ return React.Children.toArray(children);
267
+ });
268
+ _this.readColumns = memoizeOne(function (children, idPrefix, _mutationsCount) {
269
+ var columnElements = children.filter(function (child) { return child && child.type && child.type.displayName === 'KendoReactGridColumn'; });
270
+ return readColumns(columnElements, _this.columns, { prevId: 0, idPrefix: idPrefix });
271
+ });
272
+ _this.mapColumns = memoizeOne(function (columns) {
273
+ return mapColumns(columns);
274
+ });
275
+ _this.getHeaderRow = memoizeOne(function (sort, sortable, group, groupable, filter, filterable, filterOperators, headerCellRender, columnMenu, columns, columnsMap) {
276
+ return (React.createElement(HeaderRow, { sort: sort, sortable: sortable, sortChange: _this.sortChange, group: group || [], groupable: groupable, groupChange: _this.groupChange, filter: filter, filterable: filterable, filterOperators: filterOperators, filterChange: _this.filterChange, columnMenu: columnMenu, selectionChange: _this.onHeaderSelectionChange, columns: columns, columnResize: _this.columnResize, pressHandler: _this.dragLogic.pressHandler, dragHandler: _this.dragLogic.dragHandler, releaseHandler: _this.dragLogic.releaseHandler, columnsMap: columnsMap, cellRender: headerCellRender, isRtl: _this.isRtl, dragClue: _this.dragLogic.dragClueRef, headerRef: _this.headerElementRef, containerRef: _this.vs.containerRef }));
277
+ });
263
278
  _this.resolveTitle = function (field) {
264
279
  var column = _this._columns.find(function (c) { return c.field === field; });
265
280
  var title = column && (column.title || column.field);
@@ -406,6 +421,7 @@ var Grid = /** @class */ (function (_super) {
406
421
  * @hidden
407
422
  */
408
423
  Grid.prototype.render = function () {
424
+ var _a, _b, _c;
409
425
  var _this = this;
410
426
  var total = this.props.total || 0;
411
427
  var idPrefix = navigationTools.getIdPrefix(this.navigationStateRef);
@@ -424,7 +440,7 @@ var Grid = /** @class */ (function (_super) {
424
440
  this.dragLogic.reorderable = this.props.reorderable || false;
425
441
  this.dragLogic.groupable = groupable;
426
442
  var tableUserSelect = this.props.selectable && this.props.selectable.drag ? 'none' : undefined;
427
- if (total !== this.vs.total) {
443
+ if (total !== this.vs.total || (this.props.scrollable === 'virtual') !== this.vs.scrollableVirtual) {
428
444
  this.vs.reset();
429
445
  this.vs = new VirtualScroll(groupable || this.props.rowHeight === undefined || this.props.rowHeight === 0);
430
446
  this.vs.table = this.tableElement;
@@ -438,7 +454,8 @@ var Grid = /** @class */ (function (_super) {
438
454
  this.vs.propsSkip = (this.props.skip || 0) + (this.props.scrollable === 'virtual' ?
439
455
  this.vs.topCacheCount + (this.vs.attendedSkip - (this.props.skip || 0)) : 0);
440
456
  if (this.props.rowHeight !== undefined && this.props.rowHeight > 0 && !groupable) {
441
- this.vs.containerHeight = Math.min(1533915, this.props.rowHeight * (total || 0));
457
+ var containerHeight = this.props.rowHeight * total;
458
+ this.vs.containerHeight = firefox ? Math.min(firefoxMaxHeight, containerHeight) : containerHeight;
442
459
  }
443
460
  else {
444
461
  this.vs.containerHeight = 1533915;
@@ -446,25 +463,25 @@ var Grid = /** @class */ (function (_super) {
446
463
  var groupingFooter = (typeof this.props.groupable === 'object') && this.props.groupable.footer || 'none';
447
464
  this._data = [];
448
465
  var resolvedGroupsCount = flatData(this._data, propsData, groupingFooter, { index: this.props.skip || 0 }, this.props.group !== undefined, this.props.expandField);
449
- var children = React.Children.toArray(this.props.children);
450
- this.initColumns(children.filter(function (child) { return child && child.type &&
451
- child.type.displayName === 'KendoReactGridColumn'; }), resolvedGroupsCount);
466
+ var children = this.childrenToArray(this.props.children);
467
+ this.initColumns(children, resolvedGroupsCount);
452
468
  var toolbar = children.filter(function (child) { return child && child.type &&
453
469
  child.type.displayName === 'KendoReactGridToolbar'; });
454
470
  var noRecords = children.filter(function (child) { return child && child.type &&
455
471
  child.type.displayName === 'KendoReactGridNoRecords'; });
456
472
  var leafColumns = this._columns.filter(function (c) { return c.children.length === 0; });
457
473
  var groupingPanel = groupable && (React.createElement(GroupPanel, { group: this.props.group || [], groupChange: this.groupChange, pressHandler: this.dragLogic.pressHandler, dragHandler: this.dragLogic.dragHandler, releaseHandler: this.dragLogic.releaseHandler, refCallback: this.dragLogic.refGroupPanelDiv, resolveTitle: this.resolveTitle }));
458
- var header = (React.createElement(Header, { columnResize: this.columnResize, staticHeaders: this.props.scrollable !== 'none', scrollableDataElement: function () { return _this.vs.container; }, draggable: this.props.reorderable || groupable, ref: this.headerRef, elemRef: this.headerElementRef, headerRow: React.createElement(HeaderRow, { sort: this.props.sort, sortable: this.props.sortable, sortChange: this.sortChange, group: this.props.group || [], groupable: groupable, groupChange: this.groupChange, filter: this.props.filter, filterable: this.props.filterable, filterOperators: this.props.filterOperators || operators, filterChange: this.filterChange, columnMenu: this.props.columnMenu, selectionChange: this.onHeaderSelectionChange, columns: this._columns, columnResize: this.columnResize, pressHandler: this.dragLogic.pressHandler, dragHandler: this.dragLogic.dragHandler, releaseHandler: this.dragLogic.releaseHandler, columnsMap: this._columnsMap, cellRender: this.props.headerCellRender, isRtl: this.isRtl, dragClue: this.dragLogic.dragClueRef, headerRef: this.headerElementRef, containerRef: this.vs.containerRef }), filterRow: this.props.filterable && React.createElement(FilterRow, { columns: this._columns, filter: this.props.filter, filterOperators: this.props.filterOperators || operators, filterChange: this.filterChange, sort: this.props.sort, cellRender: this.props.filterCellRender, isRtl: this.isRtl, ariaRowIndex: this._columnsMap.length + 1 }) || undefined, cols: leafColumns.map(function (column, index) { return (React.createElement("col", { key: index.toString(), width: column.width !== undefined ?
474
+ var _d = this.props, sort = _d.sort, sortable = _d.sortable, group = _d.group, filter = _d.filter, filterable = _d.filterable, _e = _d.filterOperators, filterOperators = _e === void 0 ? operators : _e, headerCellRender = _d.headerCellRender, columnMenu = _d.columnMenu;
475
+ var header = (React.createElement(Header, { size: this.props.size, columnResize: this.columnResize, staticHeaders: this.props.scrollable !== 'none', scrollableDataElement: function () { return _this.vs.container; }, draggable: this.props.reorderable || groupable, ref: this.headerRef, elemRef: this.headerElementRef, headerRow: this.getHeaderRow(sort, sortable, group, groupable, filter, filterable, filterOperators, headerCellRender, columnMenu, this._columns, this._columnsMap), filterRow: this.props.filterable && React.createElement(FilterRow, { size: this.props.size, columns: this._columns, filter: this.props.filter, filterOperators: this.props.filterOperators || operators, filterChange: this.filterChange, sort: this.props.sort, cellRender: this.props.filterCellRender, isRtl: this.isRtl, ariaRowIndex: this._columnsMap.length + 1 }) || undefined, cols: leafColumns.map(function (column, index) { return (React.createElement("col", { key: index.toString(), width: column.width !== undefined ?
459
476
  Math.floor(parseFloat(column.width.toString())) + 'px' : undefined })); }) }));
460
477
  var scrollLeft = this.vs && this.vs.container && this.vs.container.scrollLeft || 0;
461
478
  var tableWidth = parseFloat(((this.props.style || {}).width || '').toString());
462
- var _a = tableColumnsVirtualization({
479
+ var _f = tableColumnsVirtualization({
463
480
  enabled: this.props.columnVirtualization,
464
481
  columns: leafColumns,
465
482
  tableViewPortWidth: tableWidth,
466
483
  scrollLeft: scrollLeft
467
- }), colSpans = _a.colSpans, isColHidden = _a.hiddenColumns;
484
+ }), colSpans = _f.colSpans, isColHidden = _f.hiddenColumns;
468
485
  var dataRow = function (item, rowId, rowDataIndex) {
469
486
  var isInEdit = false;
470
487
  var selectedValue = _this.props.selectedField ? getNestedValue(_this.props.selectedField, item.dataItem) : undefined;
@@ -481,29 +498,6 @@ var Grid = /** @class */ (function (_super) {
481
498
  ? { left: column.left, right: column.right }
482
499
  : { left: column.right, right: column.left }
483
500
  : {};
484
- var cellProps = {
485
- id: navigationTools.generateNavigatableId("".concat(rowId, "-").concat(String(columnIndex)), idPrefix),
486
- colSpan: colSpans[columnIndex],
487
- dataItem: item.dataItem,
488
- field: column.field,
489
- editor: column.editor,
490
- format: column.format,
491
- className: className,
492
- render: _this.props.cellRender,
493
- onChange: _this.itemChange,
494
- selectionChange: (_this.props.onSelectionChange) ?
495
- (function (e) { _this.selectionChange({ event: e, dataItem: item.dataItem, dataIndex: rowDataIndex, columnIndex: columnIndex }); }) :
496
- undefined,
497
- columnIndex: columnIndex,
498
- columnsCount: leafColumns.length,
499
- rowType: item.rowType,
500
- level: item.level,
501
- expanded: item.expanded,
502
- dataIndex: item.dataIndex,
503
- style: style,
504
- ariaColumnIndex: column.ariaColumnIndex,
505
- isSelected: Array.isArray(selectedValue) && selectedValue.indexOf(columnIndex) > -1
506
- };
507
501
  var currentColumnIsInEdit = false;
508
502
  if (column.editable && _this.props.editField) {
509
503
  var inEdit = getNestedValue(_this.props.editField, item.dataItem);
@@ -512,12 +506,10 @@ var Grid = /** @class */ (function (_super) {
512
506
  currentColumnIsInEdit = true;
513
507
  }
514
508
  }
515
- if (column.cell) {
516
- return React.createElement(column.cell, __assign({ key: columnKey }, cellProps, { locked: _this.props.lockGroups }));
517
- }
518
- return currentColumnIsInEdit
519
- ? React.createElement(GridEditCell, __assign({ key: columnKey }, cellProps))
520
- : React.createElement(GridCell, __assign({ key: columnKey }, cellProps));
509
+ var Cell = column.cell || (currentColumnIsInEdit && GridEditCell) || GridCell;
510
+ return (React.createElement(Cell, { key: columnKey, locked: _this.props.lockGroups, id: navigationTools.generateNavigatableId("".concat(rowId, "-").concat(String(columnIndex)), idPrefix), colSpan: colSpans[columnIndex], dataItem: item.dataItem, field: column.field, editor: column.editor, format: column.format, className: className, render: _this.props.cellRender, onChange: _this.itemChange, selectionChange: (_this.props.onSelectionChange) ?
511
+ (function (e) { _this.selectionChange({ event: e, dataItem: item.dataItem, dataIndex: rowDataIndex, columnIndex: columnIndex }); }) :
512
+ undefined, columnIndex: columnIndex, columnsCount: leafColumns.length, rowType: item.rowType, level: item.level, expanded: item.expanded, dataIndex: item.dataIndex, style: style, ariaColumnIndex: column.ariaColumnIndex, isSelected: Array.isArray(selectedValue) && selectedValue.indexOf(columnIndex) > -1 }));
521
513
  }),
522
514
  isInEdit: isInEdit,
523
515
  isSelected: typeof selectedValue === 'boolean' && selectedValue
@@ -568,9 +560,9 @@ var Grid = /** @class */ (function (_super) {
568
560
  - (_this.props.group ? _this.props.group.length : 0)) || 1;
569
561
  detailRowCount_1++;
570
562
  currentAriaRowIndex = absoluteIndex + rowIndexStart + detailRowCount_1;
571
- body.push((React.createElement("tr", { key: detailRowId, className: isAlt ? 'k-detail-row k-alt' : 'k-detail-row', style: { visibility: hidden(rowIndex) ? 'hidden' : '' }, role: "row", "aria-rowindex": currentAriaRowIndex },
572
- _this.props.group && _this.props.group.map(function (group, idx) {
573
- return (React.createElement(GridGroupCell, { id: '', dataIndex: item.dataIndex, field: group.field, dataItem: item.dataItem, key: idx, style: {}, ariaColumnIndex: 1 + idx, isSelected: false, locked: _this.props.lockGroups }));
563
+ body.push((React.createElement("tr", { key: detailRowId, className: classNames('k-table-row', isAlt ? 'k-detail-row k-table-alt-row k-alt' : 'k-detail-row'), style: { visibility: hidden(rowIndex) ? 'hidden' : '' }, role: "row", "aria-rowindex": currentAriaRowIndex },
564
+ _this.props.group && _this.props.group.map(function (gr, idx) {
565
+ return (React.createElement(GridGroupCell, { id: '', dataIndex: item.dataIndex, field: gr.field, dataItem: item.dataItem, key: idx, style: {}, ariaColumnIndex: 1 + idx, isSelected: false, locked: _this.props.lockGroups }));
574
566
  }),
575
567
  _this.props.expandField &&
576
568
  React.createElement(GridDetailHierarchyCell, { id: navigationTools.generateNavigatableId("".concat(detailRowId, "-dhcell"), idPrefix) }),
@@ -579,15 +571,15 @@ var Grid = /** @class */ (function (_super) {
579
571
  });
580
572
  }
581
573
  else {
582
- body.push((React.createElement("tr", { key: "no-records", className: "k-grid-norecords", "aria-rowindex": rowIndexStart },
583
- React.createElement("td", { colSpan: leafColumns.length }, noRecords.length ? noRecords : React.createElement(GridNoRecords, null)))));
574
+ body.push((React.createElement("tr", { key: "no-records", className: "k-table-row k-grid-norecords", role: 'row', "aria-rowindex": rowIndexStart },
575
+ React.createElement("td", { className: 'k-table-td', colSpan: leafColumns.length, role: 'gridcell' }, noRecords.length ? noRecords : React.createElement(GridNoRecords, null)))));
584
576
  }
585
- var pagerProps = __assign({ className: 'k-grid-pager', onPageChange: this.pagerPageChange, total: total, skip: this.vs.propsSkip || 0, take: (this.props.take !== undefined ? this.props.take : this.props.pageSize) || 10, messagesMap: pagerMessagesMap }, (normalize(this.props.pageable || {})));
586
- var pager = this.props.pager ? React.createElement(this.props.pager, __assign({}, pagerProps)) : React.createElement(Pager, __assign({}, pagerProps));
577
+ var pagerProps = __assign({ size: this.props.size, onPageChange: this.pagerPageChange, total: total, skip: this.vs.propsSkip || 0, take: (this.props.take !== undefined ? this.props.take : this.props.pageSize) || 10, messagesMap: pagerMessagesMap }, (normalize(this.props.pageable || {})));
578
+ var pager = this.props.pager ? React.createElement(this.props.pager, __assign({}, pagerProps)) : React.createElement(Pager, __assign({ className: "k-grid-pager" }, pagerProps));
587
579
  var sorted = function (field) {
588
580
  return _this.props.sort && _this.props.sort.filter(function (descriptor) { return descriptor.field === field; }).length > 0;
589
581
  };
590
- var footer = this._columns.some(function (c) { return Boolean(c.footerCell); }) ? (React.createElement(Footer, { columnResize: this.columnResize, staticHeaders: this.props.scrollable !== 'none', ref: function (f) { return _this._footer = f; }, row: React.createElement(FooterRow, { columns: this._columns, isRtl: this.isRtl, ariaRowIndex: currentAriaRowIndex + 1 }), cols: leafColumns.map(function (column, index) { return (React.createElement("col", { key: index.toString(), width: column.width !== undefined ?
582
+ var footer = this._columns.some(function (c) { return Boolean(c.footerCell); }) ? (React.createElement(Footer, { size: this.props.size, columnResize: this.columnResize, staticHeaders: this.props.scrollable !== 'none', ref: function (f) { return _this._footer = f; }, row: React.createElement(FooterRow, { columns: this._columns, isRtl: this.isRtl, ariaRowIndex: currentAriaRowIndex + 1 }), cols: leafColumns.map(function (column, index) { return (React.createElement("col", { key: index.toString(), width: column.width !== undefined ?
591
583
  Math.floor(parseFloat(column.width.toString())) + 'px' : undefined })); }) })) : null;
592
584
  var colGroups = (React.createElement("colgroup", { ref: function (c) {
593
585
  _this.columnResize.colGroupMain = c;
@@ -597,7 +589,11 @@ var Grid = /** @class */ (function (_super) {
597
589
  var tableDisplay = this.props.columnVirtualization ? 'block' : 'table';
598
590
  if (this.props.scrollable === 'none') {
599
591
  return (React.createElement(TableKeyboardNavigationContext.Provider, { value: this.contextStateRef.current },
600
- React.createElement("div", __assign({ id: this.props.id, style: this.props.style, className: classNames('k-widget k-grid', this.props.className), ref: function (el) { _this._element = el; }, "aria-label": this.props.ariaLabel, onKeyDown: this.onKeyDown, onFocus: this.onFocus }, tableKeyboardNavigationScopeAttributes),
592
+ React.createElement("div", __assign({ id: this.props.id, style: this.props.style, className: classNames('k-grid', (_a = {
593
+ 'k-grid-md': !this.props.size
594
+ },
595
+ _a["k-grid-".concat(kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
596
+ _a), this.props.className), ref: function (el) { _this._element = el; }, "aria-label": this.props.ariaLabel, onKeyDown: this.onKeyDown, onFocus: this.onFocus }, tableKeyboardNavigationScopeAttributes),
601
597
  toolbar,
602
598
  groupingPanel,
603
599
  React.createElement(TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease, childRef: function (table) {
@@ -608,7 +604,7 @@ var Grid = /** @class */ (function (_super) {
608
604
  React.createElement("table", { style: { userSelect: tableUserSelect, display: tableDisplay } },
609
605
  colGroups,
610
606
  header,
611
- React.createElement("tbody", __assign({}, tableKeyboardNavigationBodyAttributes), body),
607
+ React.createElement("tbody", __assign({ role: 'rowgroup', className: 'k-table-tbody' }, tableKeyboardNavigationBodyAttributes), body),
612
608
  footer)),
613
609
  this.props.pageable && pager,
614
610
  enableDragClues && (React.createElement(React.Fragment, null,
@@ -623,9 +619,12 @@ var Grid = /** @class */ (function (_super) {
623
619
  }
624
620
  }
625
621
  return (React.createElement(TableKeyboardNavigationContext.Provider, { value: this.contextStateRef.current },
626
- React.createElement("div", __assign({ id: this.props.id, style: wrapperStyle, className: classNames('k-widget k-grid', {
627
- 'k-grid-virtual': this.props.scrollable === 'virtual'
628
- }, this.props.className), ref: function (el) {
622
+ React.createElement("div", __assign({ id: this.props.id, style: wrapperStyle, className: classNames('k-grid', (_b = {
623
+ 'k-grid-md': !this.props.size
624
+ },
625
+ _b["k-grid-".concat(kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
626
+ _b['k-grid-virtual'] = this.props.scrollable === 'virtual',
627
+ _b), this.props.className), ref: function (el) {
629
628
  _this._element = el;
630
629
  _this.resetTableWidth();
631
630
  }, role: "grid", "aria-colcount": leafColumns.length, "aria-rowcount": total, "aria-label": this.props.ariaLabel, onKeyDown: this.onKeyDown, onFocus: this.onFocus }, tableKeyboardNavigationScopeAttributes),
@@ -634,16 +633,19 @@ var Grid = /** @class */ (function (_super) {
634
633
  header,
635
634
  React.createElement("div", { className: "k-grid-container", role: "presentation" },
636
635
  React.createElement("div", { ref: this.vs.containerRef, className: "k-grid-content k-virtual-content", onScroll: this.scrollHandler, role: "presentation" },
637
- React.createElement("div", { style: { 'position': 'relative' }, role: "presentation" },
638
- React.createElement(TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease, childRef: function (table) {
639
- _this.vs.table = table;
640
- _this.tableElement = table;
641
- } },
642
- React.createElement("table", { className: 'k-grid-table', role: "presentation", style: { userSelect: tableUserSelect, display: tableDisplay } },
643
- colGroups,
644
- React.createElement("tbody", __assign({ ref: function (tableBody) {
645
- _this.vs.tableBody = tableBody;
646
- }, role: "presentation" }, tableKeyboardNavigationBodyAttributes), body)))),
636
+ React.createElement(TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease, childRef: function (table) {
637
+ _this.vs.table = table;
638
+ _this.tableElement = table;
639
+ } },
640
+ React.createElement("table", { className: classNames('k-table k-grid-table', (_c = {
641
+ 'k-grid-md': !this.props.size
642
+ },
643
+ _c["k-table-".concat(kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
644
+ _c), this.props.className), role: "presentation", style: { userSelect: tableUserSelect, display: tableDisplay } },
645
+ colGroups,
646
+ React.createElement("tbody", __assign({ className: 'k-table-tbody', ref: function (tableBody) {
647
+ _this.vs.tableBody = tableBody;
648
+ }, role: 'rowgroup' }, tableKeyboardNavigationBodyAttributes), body))),
647
649
  React.createElement("div", { className: "k-height-container", role: "presentation" },
648
650
  React.createElement("div", { style: this.props.scrollable === 'virtual' ?
649
651
  { 'height': (this.vs.containerHeight) + 'px' } : {} })))),
@@ -684,6 +686,7 @@ var Grid = /** @class */ (function (_super) {
684
686
  var spliced = this._columns.splice(prev, end(prev) - prev);
685
687
  (_a = this._columns).splice.apply(_a, __spreadArray([prev < next ? end(next - spliced.length) : next, 0], spliced, false));
686
688
  this._columns.filter(function (q) { return q.declarationIndex >= 0; }).forEach(function (c, i) { return c.orderIndex = i; });
689
+ this._columnsMutations++;
687
690
  var eventColumnProps = this.columns;
688
691
  this.forceUpdate();
689
692
  if (this.props.onColumnReorder) {
@@ -735,10 +738,10 @@ var Grid = /** @class */ (function (_super) {
735
738
  this.vs.table.style.width = totalWidth + 'px';
736
739
  }
737
740
  };
738
- Grid.prototype.initColumns = function (columnElements, groupCount) {
741
+ Grid.prototype.initColumns = function (children, groupCount) {
739
742
  var _this = this;
740
743
  var idPrefix = navigationTools.getIdPrefix(this.navigationStateRef);
741
- this._columns = readColumns(columnElements, this.columns, { prevId: 0, idPrefix: idPrefix });
744
+ this._columns = this.readColumns(children, idPrefix, this._columnsMutations);
742
745
  if (this._columns.length === 0) {
743
746
  this._columns = autoGenerateColumns(this.props.data, this.props.group, this.props.expandField, { prevId: 0, idPrefix: idPrefix });
744
747
  }
@@ -778,7 +781,7 @@ var Grid = /** @class */ (function (_super) {
778
781
  columnIndexOffset++;
779
782
  }
780
783
  this._columns.slice(columnIndexOffset).forEach(function (c) { return c.parentIndex >= 0 && (c.parentIndex += columnIndexOffset); });
781
- this._columnsMap = mapColumns(this._columns);
784
+ this._columnsMap = this.mapColumns(this._columns);
782
785
  this.columnResize.columns = this._columns;
783
786
  this.dragLogic.columns = this._columns;
784
787
  };
@@ -875,7 +878,8 @@ var Grid = /** @class */ (function (_super) {
875
878
  onColumnResize: PropTypes.func,
876
879
  onColumnReorder: PropTypes.func,
877
880
  dataItemKey: PropTypes.string,
878
- navigatable: PropTypes.bool
881
+ navigatable: PropTypes.bool,
882
+ size: PropTypes.oneOf(['small', 'medium'])
879
883
  };
880
884
  /** @hidden */
881
885
  Grid.contextType = TableKeyboardNavigationContext;
@@ -14,6 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  };
15
15
  })();
16
16
  import * as React from 'react';
17
+ import { classNames, kendoThemeMaps } from '@progress/kendo-react-common';
17
18
  /**
18
19
  * Represents the GridToolbar component.
19
20
  *
@@ -61,7 +62,10 @@ var GridToolbar = /** @class */ (function (_super) {
61
62
  * @hidden
62
63
  */
63
64
  GridToolbar.prototype.render = function () {
64
- return (React.createElement("div", { className: "k-toolbar k-grid-toolbar" }, this.props.children));
65
+ var _a;
66
+ return (React.createElement("div", { className: classNames('k-toolbar k-grid-toolbar', (_a = {},
67
+ _a["k-toolbar-".concat(kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
68
+ _a), this.props.className) }, this.props.children));
65
69
  };
66
70
  /**
67
71
  * @hidden
@@ -21,7 +21,6 @@ export declare class VirtualScroll {
21
21
  containerRef: React.RefObject<HTMLDivElement>;
22
22
  get container(): HTMLDivElement | null;
23
23
  private prevScrollPos;
24
- private syncTimeout;
25
24
  private tableTranslate;
26
25
  private scrollSyncing;
27
26
  constructor(cached: boolean);
@@ -34,10 +33,11 @@ export declare class VirtualScroll {
34
33
  }>;
35
34
  changePage(skip: number, e: React.SyntheticEvent<HTMLDivElement>): void;
36
35
  translate(dY: number): void;
37
- syncScroll(): void;
38
36
  reset(): void;
39
37
  localScrollUp(e: React.SyntheticEvent<HTMLDivElement>): void;
40
38
  localScrollDown(e: React.SyntheticEvent<HTMLDivElement>): void;
41
39
  scrollNonStrict(e: React.SyntheticEvent<HTMLDivElement>): void;
42
40
  scrollHandler(e: React.SyntheticEvent<HTMLDivElement>): void;
41
+ private topItems;
42
+ private horizontalScrollbarHeight;
43
43
  }
@@ -4,6 +4,7 @@ import * as React from 'react';
4
4
  */
5
5
  var VirtualScroll = /** @class */ (function () {
6
6
  function VirtualScroll(cached) {
7
+ var _this = this;
7
8
  this.table = null;
8
9
  this.containerHeight = 0;
9
10
  this.topCacheCount = 0; // 4;
@@ -22,6 +23,25 @@ var VirtualScroll = /** @class */ (function () {
22
23
  this.prevScrollPos = 0;
23
24
  this.tableTranslate = 0;
24
25
  this.scrollSyncing = false;
26
+ this.topItems = function (heights, skipTopBuffer) {
27
+ if (!_this.container || skipTopBuffer) {
28
+ return { topItemsCount: 0, topItemsHeight: 0 };
29
+ }
30
+ var screenHeight = _this.container.clientHeight;
31
+ var itemsOnScreen = Math.ceil(screenHeight / heights[0].line);
32
+ var topItemsCount = Math.ceil((heights.length - itemsOnScreen) / 2);
33
+ var topItemsHeight = 0;
34
+ for (var i = 0; i < topItemsCount; i++) {
35
+ topItemsHeight += heights[i].line + heights[i].acc;
36
+ }
37
+ return { topItemsCount: topItemsCount, topItemsHeight: topItemsHeight };
38
+ };
39
+ this.horizontalScrollbarHeight = function () {
40
+ if (!_this.container) {
41
+ return 0;
42
+ }
43
+ return _this.container.offsetHeight - _this.container.clientHeight;
44
+ };
25
45
  if (cached) {
26
46
  this.topCacheCount = 4;
27
47
  this.attendedSkip = -this.topCacheCount;
@@ -79,22 +99,6 @@ var VirtualScroll = /** @class */ (function () {
79
99
  this.table.style.transform = 'translateY(' + dY + 'px)';
80
100
  }
81
101
  };
82
- VirtualScroll.prototype.syncScroll = function () {
83
- if (!this.scrollableVirtual || !this.container) {
84
- return;
85
- }
86
- this.syncTimeout = null;
87
- var scrollTop = this.container.scrollTop;
88
- var containerHeight = this.containerHeight; // = this.container.scrollHeight;
89
- var rowHeights = this.rowHeights;
90
- var percentage = (scrollTop - this.tableTranslate) / rowHeights[0].line;
91
- var targetFloorScrollPosition = Math.floor((containerHeight) * (this.propsSkip + percentage) / this.total);
92
- if (this.container.scrollTop !== (this.prevScrollPos = targetFloorScrollPosition)) {
93
- this.scrollSyncing = true;
94
- this.container.scrollTop = (this.prevScrollPos = targetFloorScrollPosition);
95
- }
96
- this.translate(this.tableTranslate + targetFloorScrollPosition - scrollTop);
97
- };
98
102
  VirtualScroll.prototype.reset = function () {
99
103
  this.scrollSyncing = true;
100
104
  if (this.fixedScroll) {
@@ -113,11 +117,12 @@ var VirtualScroll = /** @class */ (function () {
113
117
  var scrollTop = this.container.scrollTop;
114
118
  var targetTranslate = this.tableTranslate;
115
119
  var rowsCount = 0;
120
+ var _a = this.topItems(heights, Boolean(this.topCacheCount)), topItemsCount = _a.topItemsCount, topItemsHeight = _a.topItemsHeight;
116
121
  var additionalOnTop = scrollTop - targetTranslate;
117
- if (additionalOnTop > 0) {
122
+ if (additionalOnTop > topItemsHeight) {
118
123
  return;
119
124
  }
120
- while ((rowsCount < this.topCacheCount + this.attendedSkip - this.realSkip)
125
+ while ((rowsCount < this.topCacheCount + this.attendedSkip - this.realSkip + topItemsCount)
121
126
  && this.propsSkip - rowsCount > 0 &&
122
127
  !(targetTranslate + (heights[heights.length - 1 - rowsCount].line + heights[heights.length - 1 - rowsCount].acc) + additionalOnTop <= scrollTop)) {
123
128
  targetTranslate -= heights[heights.length - 1 - rowsCount].line +
@@ -143,8 +148,9 @@ var VirtualScroll = /** @class */ (function () {
143
148
  // floor the translate to beginning of the item in absolute value
144
149
  }
145
150
  if (targetTranslate !== this.tableTranslate) {
146
- this.translate(targetTranslate);
147
- this.changePage(this.propsSkip - rowsCount, e);
151
+ this.translate(Math.max(0, targetTranslate - topItemsHeight));
152
+ var nextSkip = Math.max(0, this.propsSkip - rowsCount - topItemsCount);
153
+ this.changePage(nextSkip, e);
148
154
  }
149
155
  };
150
156
  VirtualScroll.prototype.localScrollDown = function (e) {
@@ -155,18 +161,22 @@ var VirtualScroll = /** @class */ (function () {
155
161
  var scrollTop = this.container.scrollTop;
156
162
  var targetTranslate = this.tableTranslate;
157
163
  var rowsCount = 0;
164
+ var _a = this.topItems(heights, Boolean(this.topCacheCount)), topItemsCount = _a.topItemsCount, topItemsHeight = _a.topItemsHeight;
158
165
  while (rowsCount < heights.length - this.topCacheCount &&
159
166
  !(targetTranslate + heights[rowsCount].line + heights[rowsCount].acc > scrollTop)) {
160
167
  targetTranslate += heights[rowsCount].line + heights[rowsCount].acc;
161
168
  rowsCount++;
162
169
  }
170
+ if (topItemsCount > this.propsSkip + rowsCount) {
171
+ return;
172
+ }
163
173
  if (rowsCount >= heights.length - this.topCacheCount && this.propsSkip + rowsCount >= this.total) {
164
- this.translate(targetTranslate);
165
- this.changePage(this.total - 1, e);
174
+ this.translate(targetTranslate - topItemsHeight);
175
+ this.changePage(this.total - 1 - topItemsCount, e);
166
176
  }
167
- else if (targetTranslate !== this.tableTranslate) {
168
- this.translate(targetTranslate);
169
- this.changePage(this.propsSkip + rowsCount, e);
177
+ else if (targetTranslate !== this.tableTranslate && this.propsSkip + rowsCount - topItemsCount !== this.propsSkip) {
178
+ this.translate(targetTranslate - topItemsHeight);
179
+ this.changePage(this.propsSkip + rowsCount - topItemsCount, e);
170
180
  }
171
181
  };
172
182
  VirtualScroll.prototype.scrollNonStrict = function (e) {
@@ -185,8 +195,9 @@ var VirtualScroll = /** @class */ (function () {
185
195
  else if (rowIndexOffset === -1) {
186
196
  microAdjust = -((heights[heights.length - 1].line + heights[heights.length - 1].acc) * rowpercentage);
187
197
  }
188
- this.translate(microAdjust + this.containerHeight * floatRowIndex / this.total);
189
- this.changePage(rowIndex, e);
198
+ var _a = this.topItems(heights, Boolean(this.topCacheCount)), topItemsCount = _a.topItemsCount, topItemsHeight = _a.topItemsHeight;
199
+ this.translate(Math.max(0, microAdjust - topItemsHeight - this.horizontalScrollbarHeight() + this.containerHeight * floatRowIndex / this.total));
200
+ this.changePage(rowIndex - topItemsCount, e);
190
201
  };
191
202
  VirtualScroll.prototype.scrollHandler = function (e) {
192
203
  if (!this.scrollableVirtual) {
@@ -196,9 +207,6 @@ var VirtualScroll = /** @class */ (function () {
196
207
  this.scrollSyncing = false;
197
208
  return;
198
209
  }
199
- var grid = this;
200
- clearTimeout(this.syncTimeout);
201
- this.syncTimeout = window.setTimeout(function () { grid.syncScroll(); }, 200);
202
210
  var scrollTop = this.container.scrollTop;
203
211
  var prev = this.prevScrollPos;
204
212
  this.prevScrollPos = scrollTop;
@@ -31,7 +31,7 @@ export var GridCell = function (props) {
31
31
  intl.format(props.format, data) :
32
32
  data.toString();
33
33
  }
34
- var className = classNames(props.className, { 'k-selected': props.isSelected });
34
+ var className = classNames('k-table-td', props.className, { 'k-selected': props.isSelected });
35
35
  defaultRendering = (React.createElement("td", __assign({ colSpan: props.colSpan, style: props.style, className: className, role: 'gridcell', "aria-colindex": props.ariaColumnIndex, "aria-selected": props.isSelected }, (_a = {}, _a[GRID_COL_INDEX_ATTRIBUTE] = props.columnIndex, _a), navigationAttributes), dataAsString));
36
36
  }
37
37
  return props.render ?
@@ -15,6 +15,6 @@ import * as React from 'react';
15
15
  export var GridDetailCell = function (props) {
16
16
  var colSpan = props.colSpan, ariaColIndex = props.ariaColIndex, dataItem = props.dataItem, dataIndex = props.dataIndex, id = props.id;
17
17
  var navigationAttributes = useTableKeyboardNavigation(id);
18
- return (React.createElement("td", __assign({ className: "k-detail-cell", colSpan: colSpan, "aria-colindex": ariaColIndex, role: 'gridcell' }, navigationAttributes),
18
+ return (React.createElement("td", __assign({ className: "k-table-td k-detail-cell", colSpan: colSpan, "aria-colindex": ariaColIndex, role: 'gridcell' }, navigationAttributes),
19
19
  React.createElement(props.detail, { dataItem: dataItem, dataIndex: dataIndex })));
20
20
  };
@@ -14,5 +14,5 @@ import * as React from 'react';
14
14
  /** @hidden */
15
15
  export var GridDetailHierarchyCell = function (props) {
16
16
  var navigationAttributes = useTableKeyboardNavigation(props.id);
17
- return (React.createElement("td", __assign({ className: "k-hierarchy-cell" }, navigationAttributes)));
17
+ return (React.createElement("td", __assign({ className: "k-table-td k-hierarchy-cell" }, navigationAttributes, { role: 'gridcell' })));
18
18
  };
@@ -23,7 +23,7 @@ export var GridEditCell = function (props) {
23
23
  var _a, _b, _c, _d, _e;
24
24
  var data = getNestedValue(props.field, props.dataItem);
25
25
  var defaultRendering = null;
26
- var editCellClasses = classNames('k-grid-edit-cell', (_a = {},
26
+ var editCellClasses = classNames('k-table-td', 'k-grid-edit-cell', (_a = {},
27
27
  _a['k-selected'] = props.isSelected,
28
28
  _a), props.className);
29
29
  var inputId = React.useMemo(function () { return guid(); }, []);
@@ -16,7 +16,7 @@ var __extends = (this && this.__extends) || (function () {
16
16
  import * as React from 'react';
17
17
  import { Button } from '@progress/kendo-react-buttons';
18
18
  import { DropDownList } from '@progress/kendo-react-dropdowns';
19
- import { NumericTextBox, Input } from '@progress/kendo-react-inputs';
19
+ import { NumericTextBox, TextBox } from '@progress/kendo-react-inputs';
20
20
  import { DatePicker } from '@progress/kendo-react-dateinputs';
21
21
  import { messages, filterClearButton, filterChooseOperator } from '../messages';
22
22
  import { registerForLocalization, provideLocalizationService } from '@progress/kendo-react-intl';
@@ -31,7 +31,7 @@ var GridFilterCell = /** @class */ (function (_super) {
31
31
  return;
32
32
  }
33
33
  var value = _this.props.operators.find(function (item) { return item.operator === _this.props.operator; }) || null;
34
- return (React.createElement(DropDownList, { value: value, onChange: _this.operatorChange, className: "k-dropdown-operator", iconClassName: "k-i-filter k-icon", data: _this.props.operators, textField: "text", title: localization.toLanguageString(filterChooseOperator, messages[filterChooseOperator]), popupSettings: {
34
+ return (React.createElement(DropDownList, { size: _this.props.size, value: value, onChange: _this.operatorChange, className: "k-dropdown-operator", iconClassName: "k-i-filter k-icon", data: _this.props.operators, textField: "text", title: localization.toLanguageString(filterChooseOperator, messages[filterChooseOperator]), popupSettings: {
35
35
  width: ''
36
36
  } }));
37
37
  };
@@ -48,12 +48,12 @@ var GridFilterCell = /** @class */ (function (_super) {
48
48
  var _a;
49
49
  var localizationService = provideLocalizationService(this);
50
50
  var defaultRendering = (React.createElement("div", { className: "k-filtercell" },
51
- React.createElement("span", null,
51
+ React.createElement("div", { className: "k-filtercell-wrapper" },
52
52
  this.filterComponent(this.props.filterType, this.props.value, this.props.booleanValues),
53
53
  React.createElement("div", { className: "k-filtercell-operator" },
54
54
  this.renderOperatorEditor(localizationService),
55
55
  "\u00A0",
56
- React.createElement(Button, { icon: 'filter-clear', className: classNames((_a = {},
56
+ React.createElement(Button, { size: this.props.size, icon: 'filter-clear', className: classNames((_a = {},
57
57
  _a['k-clear-button-visible'] = Boolean(!(this.props.value === null || this.props.value === '') || this.props.operator),
58
58
  _a)), title: localizationService.toLanguageString(filterClearButton, messages[filterClearButton]), type: "button", onClick: this.clear, disabled: !(!(this.props.value === null || this.props.value === '') || this.props.operator) })))));
59
59
  if (this.props.render) {
@@ -78,13 +78,13 @@ var GridFilterCell = /** @class */ (function (_super) {
78
78
  var _this = this;
79
79
  switch (filterType) {
80
80
  case 'numeric':
81
- return (React.createElement(NumericTextBox, { value: value, onChange: function (e) { _this.inputChange(e.value, e.syntheticEvent); }, title: this.props.title, ariaLabel: this.props.ariaLabel }));
81
+ 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 }));
82
82
  case 'date':
83
- return (React.createElement(DatePicker, { value: value, onChange: function (e) { _this.inputChange(e.value, e.syntheticEvent); }, title: this.props.title, ariaLabel: this.props.ariaLabel }));
83
+ 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 }));
84
84
  case 'boolean':
85
85
  var noFilterSet_1 = function (filter) { return filter === null || filter === undefined; };
86
- return (React.createElement(DropDownList, { 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 }));
87
- default: return (React.createElement(Input, { value: value || '', onChange: function (e) { _this.inputChange(e.target.value, e.syntheticEvent); }, title: this.props.title, "aria-label": this.props.ariaLabel }));
86
+ 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 }));
87
+ 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 }));
88
88
  }
89
89
  };
90
90
  return GridFilterCell;