@michalrakus/x-react-web-lib 1.31.2 → 1.31.3
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.
|
@@ -16,6 +16,7 @@ export interface XAutoCompleteDTProps extends XFormComponentDTProps {
|
|
|
16
16
|
suggestionsLoad?: XSuggestionsLoadProp;
|
|
17
17
|
lazyLoadMaxRows?: number;
|
|
18
18
|
splitQueryValue?: boolean;
|
|
19
|
+
addRowEnabled: boolean;
|
|
19
20
|
minLength?: number;
|
|
20
21
|
filter?: XTableFieldFilterProp;
|
|
21
22
|
sortField?: string | DataTableSortMeta[];
|
|
@@ -68,7 +68,7 @@ var XAutoCompleteDT = /** @class */ (function (_super) {
|
|
|
68
68
|
// TODO - size
|
|
69
69
|
//const size = this.props.size ?? xDisplayField.length;
|
|
70
70
|
// div className="col" nam zabezpeci aby XAutoCompleteBase nezaberal celu dlzku grid-u (ma nastaveny width=100% vdaka "formgroup-inline")
|
|
71
|
-
return (react_1.default.createElement(XAutoCompleteBase_1.XAutoCompleteBase, { value: this.getValue(), onChange: this.onChangeAutoCompleteBase, field: this.props.displayField, itemTemplate: this.props.itemTemplate, searchBrowse: this.props.searchBrowse, valueForm: this.props.assocForm, idField: xEntityAssoc.idField, readOnly: this.isReadOnly(), error: this.getError(), onErrorChange: this.onErrorChangeAutoCompleteBase, suggestions: this.props.suggestions, suggestionsLoad: this.props.suggestionsLoad, lazyLoadMaxRows: this.props.lazyLoadMaxRows, splitQueryValue: this.props.splitQueryValue, minLength: this.props.minLength, scrollHeight: this.props.scrollHeight, suggestionsQuery: { entity: this.xAssoc.entityName, filter: function () { return _this.getFilterBase(_this.props.filter); }, sortField: this.props.sortField, fields: this.props.fields }, inputClassName: this.props.inputClassName }));
|
|
71
|
+
return (react_1.default.createElement(XAutoCompleteBase_1.XAutoCompleteBase, { value: this.getValue(), onChange: this.onChangeAutoCompleteBase, field: this.props.displayField, itemTemplate: this.props.itemTemplate, searchBrowse: this.props.searchBrowse, valueForm: this.props.assocForm, idField: xEntityAssoc.idField, readOnly: this.isReadOnly(), error: this.getError(), onErrorChange: this.onErrorChangeAutoCompleteBase, suggestions: this.props.suggestions, suggestionsLoad: this.props.suggestionsLoad, lazyLoadMaxRows: this.props.lazyLoadMaxRows, splitQueryValue: this.props.splitQueryValue, addRowEnabled: this.props.addRowEnabled, minLength: this.props.minLength, scrollHeight: this.props.scrollHeight, suggestionsQuery: { entity: this.xAssoc.entityName, filter: function () { return _this.getFilterBase(_this.props.filter); }, sortField: this.props.sortField, fields: this.props.fields }, inputClassName: this.props.inputClassName }));
|
|
72
72
|
};
|
|
73
73
|
return XAutoCompleteDT;
|
|
74
74
|
}(XFormComponentDT_1.XFormComponentDT));
|
|
@@ -116,6 +116,7 @@ export interface XFormAutoCompleteColumnProps extends XFormColumnBaseProps {
|
|
|
116
116
|
displayField: string;
|
|
117
117
|
searchBrowse?: JSX.Element;
|
|
118
118
|
assocForm?: JSX.Element;
|
|
119
|
+
addRowEnabled: boolean;
|
|
119
120
|
filter?: XTableFieldFilterProp;
|
|
120
121
|
sortField?: string | DataTableSortMeta[];
|
|
121
122
|
fields?: string[];
|
|
@@ -153,6 +154,7 @@ export declare const XFormAutoCompleteColumn: {
|
|
|
153
154
|
(props: XFormAutoCompleteColumnProps): null;
|
|
154
155
|
defaultProps: {
|
|
155
156
|
type: string;
|
|
157
|
+
addRowEnabled: boolean;
|
|
156
158
|
columnViewStatus: boolean;
|
|
157
159
|
};
|
|
158
160
|
};
|
|
@@ -404,7 +404,7 @@ var XFormDataTable2 = /** @class */ (function (_super) {
|
|
|
404
404
|
}
|
|
405
405
|
else if (columnProps.type === "autoComplete") {
|
|
406
406
|
var columnPropsAutoComplete = columnProps;
|
|
407
|
-
body = react_1.default.createElement(XAutoCompleteDT_1.XAutoCompleteDT, { form: this.props.form, entity: this.getEntity(), assocField: columnPropsAutoComplete.assocField, displayField: columnPropsAutoComplete.displayField, searchBrowse: columnPropsAutoComplete.searchBrowse, assocForm: columnPropsAutoComplete.assocForm, filter: columnPropsAutoComplete.filter, sortField: columnPropsAutoComplete.sortField, fields: columnPropsAutoComplete.fields, suggestions: columnPropsAutoComplete.suggestions, rowData: rowData, readOnly: readOnly });
|
|
407
|
+
body = react_1.default.createElement(XAutoCompleteDT_1.XAutoCompleteDT, { form: this.props.form, entity: this.getEntity(), assocField: columnPropsAutoComplete.assocField, displayField: columnPropsAutoComplete.displayField, searchBrowse: columnPropsAutoComplete.searchBrowse, assocForm: columnPropsAutoComplete.assocForm, addRowEnabled: columnPropsAutoComplete.addRowEnabled, filter: columnPropsAutoComplete.filter, sortField: columnPropsAutoComplete.sortField, fields: columnPropsAutoComplete.fields, suggestions: columnPropsAutoComplete.suggestions, rowData: rowData, readOnly: readOnly });
|
|
408
408
|
}
|
|
409
409
|
else if (columnProps.type === "searchButton") {
|
|
410
410
|
var columnPropsSearchButton = columnProps;
|
|
@@ -737,7 +737,7 @@ var XFormAutoCompleteColumn = function (props) {
|
|
|
737
737
|
return (null);
|
|
738
738
|
};
|
|
739
739
|
exports.XFormAutoCompleteColumn = XFormAutoCompleteColumn;
|
|
740
|
-
exports.XFormAutoCompleteColumn.defaultProps = __assign(__assign({}, XFormColumnBase_defaultProps), { type: "autoComplete" });
|
|
740
|
+
exports.XFormAutoCompleteColumn.defaultProps = __assign(__assign({}, XFormColumnBase_defaultProps), { type: "autoComplete", addRowEnabled: true });
|
|
741
741
|
var XFormSearchButtonColumn = function (props) {
|
|
742
742
|
// nevadi ze tu nic nevraciame, field a header vieme precitat a zvysok by sme aj tak zahodili lebo vytvarame novy element
|
|
743
743
|
return (null);
|