@michalrakus/x-react-web-lib 1.32.2 → 1.32.4

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.
@@ -6,4 +6,5 @@ export declare const XButton: (props: {
6
6
  icon?: IconType<ButtonProps>;
7
7
  onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
8
8
  disabled?: boolean | undefined;
9
+ style?: React.CSSProperties | undefined;
9
10
  }) => React.JSX.Element;
@@ -8,6 +8,6 @@ var react_1 = __importDefault(require("react"));
8
8
  var button_1 = require("primereact/button");
9
9
  var XButton = function (props) {
10
10
  // zatial iba pridany class x-button, aby sme vedeli nastavit margin "m-1" (0.25rem)
11
- return (react_1.default.createElement(button_1.Button, { label: props.label, icon: props.icon, onClick: props.onClick, disabled: props.disabled, className: "m-1" }));
11
+ return (react_1.default.createElement(button_1.Button, { label: props.label, icon: props.icon, onClick: props.onClick, disabled: props.disabled, className: "m-1", style: props.style }));
12
12
  };
13
13
  exports.XButton = XButton;
@@ -31,6 +31,7 @@ export declare abstract class XFormBase extends Component<XFormProps> {
31
31
  assoc: string;
32
32
  sortField: string;
33
33
  }>;
34
+ tabViewUsed: boolean;
34
35
  constructor(props: XFormProps);
35
36
  componentDidMount(): Promise<void>;
36
37
  getEntity(): string;
@@ -38,6 +39,8 @@ export declare abstract class XFormBase extends Component<XFormProps> {
38
39
  getObject(): any;
39
40
  isAddRow(): boolean;
40
41
  isInDialog(): boolean;
42
+ isTabViewUsed(): boolean;
43
+ setTabViewUsed(tabViewUsed: boolean): void;
41
44
  onFieldChange(field: string, value: any, error?: string | undefined, onChange?: XFieldOnChange, assocObjectChange?: OperationType): void;
42
45
  onTableFieldChange(rowData: any, field: string, value: any, error?: string | undefined, onChange?: XTableFieldOnChange, assocObjectChange?: OperationType): void;
43
46
  /**
@@ -141,6 +141,7 @@ var XFormBase = /** @class */ (function (_super) {
141
141
  _this.xFormDataTableList = [];
142
142
  _this.assocToValidateList = [];
143
143
  _this.assocToSortList = [];
144
+ _this.tabViewUsed = false; // default
144
145
  _this.onClickSave = _this.onClickSave.bind(_this);
145
146
  _this.onClickCancel = _this.onClickCancel.bind(_this);
146
147
  return _this;
@@ -236,6 +237,13 @@ var XFormBase = /** @class */ (function (_super) {
236
237
  XFormBase.prototype.isInDialog = function () {
237
238
  return this.props.onSaveOrCancel !== undefined;
238
239
  };
240
+ // helper method
241
+ XFormBase.prototype.isTabViewUsed = function () {
242
+ return this.tabViewUsed;
243
+ };
244
+ XFormBase.prototype.setTabViewUsed = function (tabViewUsed) {
245
+ this.tabViewUsed = tabViewUsed;
246
+ };
239
247
  XFormBase.prototype.onFieldChange = function (field, value, error, onChange, assocObjectChange) {
240
248
  // field moze byt aj na asociovanom objekte (field length > 1, napr.: <assocX>.<fieldY>)
241
249
  // v takom pripade sa do errorMap zapise ako key cely field <assocX>.<fieldY>
@@ -558,6 +558,14 @@ var XFormDataTable2 = /** @class */ (function (_super) {
558
558
  if (this.props.scrollable) {
559
559
  if (this.props.scrollWidth !== "none") {
560
560
  scrollWidth = this.props.scrollWidth;
561
+ if (scrollWidth === "viewport") {
562
+ var marginsWidth = XUtils_1.XUtils.isMobile() ? 1.2 : 2.2; // desktop - povodne bolo 1.4rem (20px okraje) namiesto 2.2 ale pri vela stlpcoch vznikal horizontalny scrollbar
563
+ // mobil - padding 0.5rem body element, ale este bola tabulka moc siroka, tak sme dali 1.2
564
+ if (this.props.form.isTabViewUsed()) {
565
+ marginsWidth += 1; // TabPanel has padding 0.5rem (in css file) -> 1rem both margins
566
+ }
567
+ scrollWidth = "calc(100vw - ".concat(marginsWidth, "rem)");
568
+ }
561
569
  }
562
570
  if (this.props.scrollHeight !== "none") {
563
571
  scrollHeight = this.props.scrollHeight;
@@ -705,7 +713,8 @@ var XFormDataTable2 = /** @class */ (function (_super) {
705
713
  sortable: false,
706
714
  sortField: "idFieldOnUpdate",
707
715
  scrollable: true,
708
- scrollWidth: '100%',
716
+ //scrollWidth: '100%', // nefungovalo dobre - hodnota '100%' zapne horizontalne scrollovanie, ak je tabulka sirsia ako parent element (a ten by mal byt max 100vw) (hodnota 'auto' (podobna ako '100%') nefunguje dobre)
717
+ scrollWidth: 'viewport',
709
718
  scrollHeight: '200vh',
710
719
  // tym ze pouzivame 200vh (max-height pre body), tak realne scrollovanie sa zapne az pri velmi vela riadkoch
711
720
  shrinkWidth: true,
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.XFtsInput = void 0;
18
18
  var react_1 = __importDefault(require("react"));
19
19
  var XInputTextBase_1 = require("./XInputTextBase");
20
+ var XUtils_1 = require("./XUtils");
20
21
  var XFtsInput = function (props) {
21
22
  var onChange = function (value) {
22
23
  props.value.value = value;
@@ -24,6 +25,6 @@ var XFtsInput = function (props) {
24
25
  };
25
26
  // TODO - pridat input na zmenu matchMode
26
27
  // we use XInputTextBase - we save onChange calls
27
- return (react_1.default.createElement(XInputTextBase_1.XInputTextBase, { value: props.value.value, onChange: onChange, style: { height: '2.5rem', width: '17rem' }, className: "m-1" }));
28
+ return (react_1.default.createElement(XInputTextBase_1.XInputTextBase, { value: props.value.value, onChange: onChange, style: { height: '2.5rem', width: XUtils_1.XUtils.isMobile() ? '7rem' : '17rem' }, className: "m-1" }));
28
29
  };
29
30
  exports.XFtsInput = XFtsInput;
@@ -10,9 +10,9 @@ export interface XInputTextareaProps extends XInputProps<string> {
10
10
  export declare class XInputTextarea extends XInput<string, XInputTextareaProps> {
11
11
  static defaultProps: {
12
12
  cols: string;
13
- labelOnTop: boolean;
14
13
  };
15
14
  xInputTextareaBaseRef: any;
15
+ labelOnTop: boolean;
16
16
  constructor(props: XInputTextareaProps);
17
17
  getValue(): string | null;
18
18
  onValueChange(value: string | null): void;
@@ -29,6 +29,12 @@ var XInputTextarea = /** @class */ (function (_super) {
29
29
  function XInputTextarea(props) {
30
30
  var _this = _super.call(this, props) || this;
31
31
  _this.xInputTextareaBaseRef = react_1.default.createRef();
32
+ if (props.labelOnTop !== undefined) {
33
+ _this.labelOnTop = props.labelOnTop;
34
+ }
35
+ else {
36
+ _this.labelOnTop = XUtils_1.XUtils.isMobile();
37
+ }
32
38
  _this.onValueChange = _this.onValueChange.bind(_this);
33
39
  return _this;
34
40
  }
@@ -40,7 +46,7 @@ var XInputTextarea = /** @class */ (function (_super) {
40
46
  };
41
47
  XInputTextarea.prototype.getLabelStyle = function () {
42
48
  var _a;
43
- return this.props.labelOnTop ? ((_a = this.props.labelStyle) !== null && _a !== void 0 ? _a : {}) : _super.prototype.getLabelStyle.call(this);
49
+ return this.labelOnTop ? ((_a = this.props.labelStyle) !== null && _a !== void 0 ? _a : {}) : _super.prototype.getLabelStyle.call(this);
44
50
  };
45
51
  // api method - can be called through "ref" from parent if needed to adjust the height of the input textarea according to the (changed) content
46
52
  XInputTextarea.prototype.autoResize = function () {
@@ -59,7 +65,7 @@ var XInputTextarea = /** @class */ (function (_super) {
59
65
  // pridame width:100%
60
66
  //fieldStyle = {width: '100%'};
61
67
  var widthValue = void 0;
62
- if (this.props.labelOnTop) {
68
+ if (this.labelOnTop) {
63
69
  widthValue = '100%';
64
70
  }
65
71
  else {
@@ -89,16 +95,15 @@ var XInputTextarea = /** @class */ (function (_super) {
89
95
  labelElemId = "".concat(this.props.field, "_label_id");
90
96
  }
91
97
  // InputTextarea renderujeme az ked mame nacitany object, lebo inac pri autoResize sa nam nenastavi spravna velkost (hodnota nie je k dispozicii pri prvom renderingu)
92
- return (react_1.default.createElement("div", { className: !this.props.labelOnTop ? 'field grid' : 'field grid x-inputtextarea-label-on-top', style: fieldStyle },
93
- react_1.default.createElement("label", { id: labelElemId, htmlFor: this.props.field, className: !this.props.labelOnTop ? 'col-fixed' : undefined, style: labelStyle }, this.getLabel()),
98
+ return (react_1.default.createElement("div", { className: !this.labelOnTop ? 'field grid' : 'field grid x-inputtextarea-label-on-top', style: fieldStyle },
99
+ react_1.default.createElement("label", { id: labelElemId, htmlFor: this.props.field, className: !this.labelOnTop ? 'col-fixed' : undefined, style: labelStyle }, this.getLabel()),
94
100
  labelTooltip ? react_1.default.createElement(tooltip_1.Tooltip, { target: "#".concat(labelElemId), content: labelTooltip }) : null,
95
101
  this.props.form.state.object ?
96
102
  react_1.default.createElement(XInputTextareaBase_1.XInputTextareaBase, { ref: this.xInputTextareaBaseRef, id: this.props.field, value: value, onChange: this.onValueChange, readOnly: this.isReadOnly(), maxLength: this.xField.length, style: inputStyle, rows: this.props.rows, cols: cols, autoResize: this.props.autoResize, error: this.getError(), tooltip: this.props.tooltip, placeholder: (_b = this.props.placeholder) !== null && _b !== void 0 ? _b : this.props.desc })
97
103
  : null));
98
104
  };
99
105
  XInputTextarea.defaultProps = {
100
- cols: "full",
101
- labelOnTop: false
106
+ cols: "full"
102
107
  };
103
108
  return XInputTextarea;
104
109
  }(XInput_1.XInput));
@@ -14,6 +14,7 @@ export interface XAppButtonForRow {
14
14
  icon?: IconType<ButtonProps>;
15
15
  label: string;
16
16
  onClick: (selectedRow: any) => void;
17
+ style?: React.CSSProperties;
17
18
  }
18
19
  export interface XOptionalCustomFilter {
19
20
  label: string;
@@ -44,6 +45,9 @@ export interface XLazyDataTableProps {
44
45
  rows: number;
45
46
  filterDisplay: "menu" | "row";
46
47
  betweenFilter?: XBetweenFilterProp;
48
+ autoFilter: boolean;
49
+ showFilterButtons: boolean;
50
+ showExportRows?: boolean;
47
51
  scrollable: boolean;
48
52
  scrollWidth: string;
49
53
  scrollHeight: string;
@@ -80,6 +84,8 @@ export declare const XLazyDataTable: {
80
84
  paginator: boolean;
81
85
  rows: number;
82
86
  filterDisplay: string;
87
+ autoFilter: boolean;
88
+ showFilterButtons: boolean;
83
89
  fullTextSearch: boolean;
84
90
  multilineSwitch: boolean;
85
91
  multilineSwitchInitValue: string;
@@ -335,10 +335,12 @@ var XLazyDataTable = function (props) {
335
335
  });
336
336
  }); };
337
337
  var onFilter = function (event) {
338
+ // pozor! tato metoda sa nevola, odkedy vzdy pouzivame filterElement na elemente Column (mame vo filtri vlastne komponenty ktore priamo volaju setFilters(...))
338
339
  //console.log("zavolany onFilter - this.state.filters = " + JSON.stringify(filters));
339
340
  //console.log("zavolany onFilter - event.filters = " + JSON.stringify(event.filters));
340
341
  // tymto zavolanim sa zapise znak zapisany klavesnicou do inputu filtra (ak prikaz zakomentujeme, input filtra zostane prazdny)
341
342
  setFilters(event.filters);
343
+ loadDataBaseIfAutoFilter(event.filters);
342
344
  };
343
345
  var onSort = function (event) {
344
346
  //console.log("zavolany onSort - this.state.multiSortMeta = " + JSON.stringify(multiSortMeta));
@@ -348,6 +350,13 @@ var XLazyDataTable = function (props) {
348
350
  findParam.multiSortMeta = event.multiSortMeta; // prepiseme multiSortMeta, lebo je tam stara hodnota (volanie setMultiSortMeta nezmeni multiSortMeta hned)
349
351
  loadDataBase(findParam);
350
352
  };
353
+ var loadDataBaseIfAutoFilter = function (filters) {
354
+ if (props.autoFilter) {
355
+ var findParam = createFindParam();
356
+ findParam.filters = filters; // prepiseme filters, lebo je tam stara hodnota
357
+ loadDataBase(findParam);
358
+ }
359
+ };
351
360
  var onClickFilter = function () {
352
361
  //console.log("zavolany onClickFilter");
353
362
  loadData();
@@ -747,6 +756,7 @@ var XLazyDataTable = function (props) {
747
756
  // neskusal som, ci treba aj toto klonovat ale pravdepodobne hej
748
757
  var filtersCloned = __assign({}, filters);
749
758
  setFilters(filtersCloned);
759
+ loadDataBaseIfAutoFilter(filtersCloned);
750
760
  };
751
761
  // vseobecna specialna metodka pouzvana pri custom filtri (XLazyColumn.filterElement)
752
762
  var getFilterItem = function (field) {
@@ -764,6 +774,7 @@ var XLazyDataTable = function (props) {
764
774
  // treba klonovat, inac react nezobrazi zmenenu hodnotu
765
775
  var filtersCloned = __assign({}, filters);
766
776
  setFilters(filtersCloned);
777
+ loadDataBaseIfAutoFilter(filtersCloned);
767
778
  };
768
779
  // vseobecna metodka - precita hodnotu z filtra (vrati napr. typ Date | null)
769
780
  var getFilterValue = function (field) {
@@ -885,13 +896,15 @@ var XLazyDataTable = function (props) {
885
896
  return bodyValue;
886
897
  };
887
898
  // ak mame scrollWidth/scrollHeight = viewport (default), vyratame scrollWidth/scrollHeight tak aby tabulka "sadla" do okna (viewport-u)
899
+ var isMobile = XUtils_1.XUtils.isMobile();
888
900
  var scrollWidth = undefined; // vypnute horizontalne scrollovanie
889
901
  var scrollHeight = undefined; // vypnute vertikalne scrollovanie
890
902
  if (props.scrollable) {
891
903
  if (props.scrollWidth !== "none") {
892
904
  scrollWidth = props.scrollWidth;
893
905
  if (scrollWidth === "viewport") {
894
- scrollWidth = 'calc(100vw - 2.2rem)'; // povodne bolo 1.4rem (20px okraje) ale pri vela stlpcoch vznikal horizontalny scrollbar
906
+ scrollWidth = "calc(100vw - ".concat(isMobile ? 1 : 2.2, "rem)"); // desktop - povodne bolo 1.4rem (20px okraje) namiesto 2.2 ale pri vela stlpcoch vznikal horizontalny scrollbar
907
+ // mobil - padding 0.5rem body element
895
908
  }
896
909
  }
897
910
  if (props.scrollHeight !== "none") {
@@ -916,7 +929,7 @@ var XLazyDataTable = function (props) {
916
929
  }
917
930
  else {
918
931
  // sme v dialogu
919
- if (XUtils_1.XUtils.isMobile()) {
932
+ if (isMobile) {
920
933
  viewHeight = '98vh'; // .p-dialog pre mobil ma max-height: 98%
921
934
  headerFooterHeight = XUtils_1.XUtils.toPX0('12.03rem'); // rucne zratane
922
935
  }
@@ -959,23 +972,46 @@ var XLazyDataTable = function (props) {
959
972
  }
960
973
  // pouzivame paginatorLeft aj paginatorRight (aj prazdny) pouzivame, aby bol default paginator v strede (bez paginatorLeft je default paginator presunuty dolava a naopak)
961
974
  // sirku div-ov este nastavujeme v css na 10rem
962
- var paginatorLeft = react_1.default.createElement("div", null,
963
- (0, XLocale_1.xLocaleOption)('totalRecords'),
964
- ": ",
965
- value.totalRecords);
966
- var paginatorRight = react_1.default.createElement("div", null);
967
- if (props.editMode === true) {
968
- paginatorRight = react_1.default.createElement("div", null,
969
- react_1.default.createElement(XButtonIconSmall_1.XButtonIconSmall, { icon: "pi pi-save", onClick: function () { var _a; return (_a = props.editModeHandlers) === null || _a === void 0 ? void 0 : _a.onSave(); }, tooltip: "Save form" }),
970
- react_1.default.createElement(XButtonIconSmall_1.XButtonIconSmall, { icon: "pi pi-times", onClick: function () { var _a; return (_a = props.editModeHandlers) === null || _a === void 0 ? void 0 : _a.onCancel(); }, tooltip: "Cancel editing" }));
975
+ var paginatorLeft;
976
+ var paginatorRight;
977
+ var pageLinkSize;
978
+ if (!isMobile) {
979
+ paginatorLeft = react_1.default.createElement("div", null,
980
+ (0, XLocale_1.xLocaleOption)('totalRecords'),
981
+ ": ",
982
+ value.totalRecords);
983
+ paginatorRight = react_1.default.createElement("div", null);
984
+ pageLinkSize = 5; // default
985
+ if (props.editMode === true) {
986
+ paginatorRight = react_1.default.createElement("div", null,
987
+ react_1.default.createElement(XButtonIconSmall_1.XButtonIconSmall, { icon: "pi pi-save", onClick: function () { var _a; return (_a = props.editModeHandlers) === null || _a === void 0 ? void 0 : _a.onSave(); }, tooltip: "Save form" }),
988
+ react_1.default.createElement(XButtonIconSmall_1.XButtonIconSmall, { icon: "pi pi-times", onClick: function () { var _a; return (_a = props.editModeHandlers) === null || _a === void 0 ? void 0 : _a.onCancel(); }, tooltip: "Cancel editing" }));
989
+ }
990
+ else if (props.editMode === false) {
991
+ paginatorRight = react_1.default.createElement("div", null,
992
+ react_1.default.createElement(XButtonIconSmall_1.XButtonIconSmall, { icon: "pi pi-pencil", onClick: function () { var _a; return (_a = props.editModeHandlers) === null || _a === void 0 ? void 0 : _a.onStart(); }, tooltip: "Edit form" }));
993
+ }
994
+ // else - editMode is undefined - browse is not editable
995
+ }
996
+ else {
997
+ // na mobile setrime miesto
998
+ paginatorLeft = react_1.default.createElement("div", { style: { minWidth: '3rem' } }, value.totalRecords);
999
+ paginatorRight = react_1.default.createElement("div", { style: { minWidth: '3rem' } });
1000
+ pageLinkSize = 3;
1001
+ }
1002
+ var exportRows;
1003
+ if (props.searchBrowseParams !== undefined) {
1004
+ // export pre search button-y zatial vypneme
1005
+ exportRows = false;
1006
+ }
1007
+ else if (props.showExportRows !== undefined) {
1008
+ // mame explicitne definovane ci ano alebo nie
1009
+ exportRows = props.showExportRows;
971
1010
  }
972
- else if (props.editMode === false) {
973
- paginatorRight = react_1.default.createElement("div", null,
974
- react_1.default.createElement(XButtonIconSmall_1.XButtonIconSmall, { icon: "pi pi-pencil", onClick: function () { var _a; return (_a = props.editModeHandlers) === null || _a === void 0 ? void 0 : _a.onStart(); }, tooltip: "Edit form" }));
1011
+ else {
1012
+ // len na desktope zobrazime
1013
+ exportRows = !isMobile;
975
1014
  }
976
- // else - editMode is undefined - browse is not editable
977
- // export pre search button-y zatial vypneme
978
- var exportRows = (props.searchBrowseParams === undefined);
979
1015
  // pre lepsiu citatelnost vytvarame stlpce uz tu
980
1016
  var columnElemList = react_1.default.Children.map(props.children.filter(function (child) { return XUtils_1.XUtils.xViewStatus(child.props.columnViewStatus) !== XUtils_1.XViewStatus.Hidden; }), function (child) {
981
1017
  // ak chceme zmenit child element, tak treba bud vytvorit novy alebo vyklonovat
@@ -1182,19 +1218,19 @@ var XLazyDataTable = function (props) {
1182
1218
  react_1.default.createElement("div", { className: "flex justify-content-center align-items-center" },
1183
1219
  props.label ? react_1.default.createElement("div", { className: "x-lazy-datatable-label" }, props.label) : null,
1184
1220
  ftsInputValue ? react_1.default.createElement(XFtsInput_1.XFtsInput, { value: ftsInputValue, onChange: function (value) { return setFtsInputValue(value); } }) : null,
1185
- react_1.default.createElement(XButton_1.XButton, { key: "filter", label: (0, XLocale_1.xLocaleOption)('filter'), onClick: onClickFilter }),
1186
- react_1.default.createElement(XButton_1.XButton, { key: "clearFilter", label: (0, XLocale_1.xLocaleOption)('clearFilter'), onClick: onClickClearFilter }),
1221
+ props.showFilterButtons ? react_1.default.createElement(XButton_1.XButton, { key: "filter", icon: isMobile ? "pi pi-search" : undefined, label: !isMobile ? (0, XLocale_1.xLocaleOption)('filter') : undefined, onClick: onClickFilter }) : null,
1222
+ props.showFilterButtons ? react_1.default.createElement(XButton_1.XButton, { key: "clearFilter", icon: isMobile ? "pi pi-ban" : undefined, label: !isMobile ? (0, XLocale_1.xLocaleOption)('clearFilter') : undefined, onClick: onClickClearFilter }) : null,
1187
1223
  props.optionalCustomFilters ? react_1.default.createElement(XOcfDropdown_1.XOcfDropdown, { optionalCustomFilters: props.optionalCustomFilters, value: optionalCustomFilter, onChange: function (value) { return setOptionalCustomFilter(value); }, className: "m-1" }) : null,
1188
1224
  props.multilineSwitch ? react_1.default.createElement(XMultilineSwitch_1.XMultilineSwitch, { value: multilineSwitchValue, onChange: function (value) { return setMultilineSwitchValue(value); }, className: "m-1" }) : null,
1189
- props.label ? react_1.default.createElement("div", { className: "x-lazy-datatable-label-right-compensation" }) : null),
1225
+ props.label && !isMobile ? react_1.default.createElement("div", { className: "x-lazy-datatable-label-right-compensation" }) : null),
1190
1226
  react_1.default.createElement("div", { className: "flex justify-content-center" },
1191
- react_1.default.createElement(datatable_1.DataTable, { value: value.rowList, dataKey: dataKey, paginator: props.paginator, rows: rows, totalRecords: value.totalRecords, lazy: true, first: first, onPage: onPage, loading: loading, filterDisplay: props.filterDisplay, filters: filters, onFilter: onFilter, sortMode: "multiple", removableSort: true, multiSortMeta: multiSortMeta, onSort: onSort, selectionMode: "single", selection: selectedRow, onSelectionChange: onSelectionChange, onRowDoubleClick: onRowDoubleClick, rowClassName: props.rowClassName, ref: dataTableEl, className: "p-datatable-sm x-lazy-datatable", resizableColumns: true, columnResizeMode: "expand", tableStyle: tableStyle, paginatorLeft: paginatorLeft, paginatorRight: paginatorRight, scrollable: props.scrollable, scrollHeight: scrollHeight, style: style }, columnElemList)),
1227
+ react_1.default.createElement(datatable_1.DataTable, { value: value.rowList, dataKey: dataKey, paginator: props.paginator, pageLinkSize: pageLinkSize, rows: rows, totalRecords: value.totalRecords, lazy: true, first: first, onPage: onPage, loading: loading, filterDisplay: props.filterDisplay, filters: filters, onFilter: onFilter, sortMode: "multiple", removableSort: true, multiSortMeta: multiSortMeta, onSort: onSort, selectionMode: "single", selection: selectedRow, onSelectionChange: onSelectionChange, onRowDoubleClick: onRowDoubleClick, rowClassName: props.rowClassName, ref: dataTableEl, className: "p-datatable-sm x-lazy-datatable", resizableColumns: true, columnResizeMode: "expand", tableStyle: tableStyle, paginatorLeft: paginatorLeft, paginatorRight: paginatorRight, scrollable: props.scrollable, scrollHeight: scrollHeight, style: style }, columnElemList)),
1192
1228
  react_1.default.createElement("div", { className: "flex justify-content-center" },
1193
1229
  props.onAddRow !== undefined && props.searchBrowseParams === undefined ? react_1.default.createElement(XButton_1.XButton, { key: "addRow", icon: "pi pi-plus", label: (0, XLocale_1.xLocaleOption)('addRow'), onClick: onClickAddRow }) : null,
1194
1230
  props.onEdit !== undefined && props.searchBrowseParams === undefined ? react_1.default.createElement(XButton_1.XButton, { key: "editRow", icon: "pi pi-pencil", label: (0, XLocale_1.xLocaleOption)('editRow'), onClick: onClickEdit }) : null,
1195
1231
  props.removeRow !== undefined && props.removeRow !== false && props.searchBrowseParams === undefined ? react_1.default.createElement(XButton_1.XButton, { key: "removeRow", icon: "pi pi-times", label: (0, XLocale_1.xLocaleOption)('removeRow'), onClick: onClickRemoveRow }) : null,
1196
1232
  exportRows ? react_1.default.createElement(XButton_1.XButton, { key: "exportRows", icon: "pi pi-file-export", label: (0, XLocale_1.xLocaleOption)('exportRows'), onClick: onClickExport }) : null,
1197
- props.appButtonsForRow ? props.appButtonsForRow.map(function (xAppButton) { return react_1.default.createElement(XButton_1.XButton, { key: xAppButton.key, icon: xAppButton.icon, label: xAppButton.label, onClick: function () { return onClickAppButtonForRow(xAppButton.onClick); } }); }) : null,
1233
+ props.appButtonsForRow ? props.appButtonsForRow.map(function (xAppButton) { return react_1.default.createElement(XButton_1.XButton, { key: xAppButton.key, icon: xAppButton.icon, label: xAppButton.label, onClick: function () { return onClickAppButtonForRow(xAppButton.onClick); }, style: xAppButton.style }); }) : null,
1198
1234
  props.appButtons,
1199
1235
  props.searchBrowseParams !== undefined ? react_1.default.createElement(XButton_1.XButton, { key: "choose", label: (0, XLocale_1.xLocaleOption)('chooseRow'), onClick: onClickChoose }) : null,
1200
1236
  exportRows ? react_1.default.createElement(XExportRowsDialog_1.XExportRowsDialog, { key: "exportRowsDialog", dialogState: exportRowsDialogState, hideDialog: function () { return setExportRowsDialogState({ dialogOpened: false }); } }) : null),
@@ -1205,6 +1241,8 @@ exports.XLazyDataTable.defaultProps = {
1205
1241
  paginator: true,
1206
1242
  rows: 10,
1207
1243
  filterDisplay: "row",
1244
+ autoFilter: false,
1245
+ showFilterButtons: true,
1208
1246
  fullTextSearch: true,
1209
1247
  multilineSwitch: false,
1210
1248
  multilineSwitchInitValue: "allLines",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michalrakus/x-react-web-lib",
3
- "version": "1.32.2",
3
+ "version": "1.32.4",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "clean": "rimraf lib",