mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 18:02:18 +00:00
filter component set default height only if no height attribute is set in tabulatoroptions. remove reactivedata default setting and old todo comments
This commit is contained in:
@@ -75,7 +75,7 @@ export const CoreFilterCmpt = {
|
||||
newBtnDisabled: Boolean,
|
||||
newBtnLabel: String,
|
||||
uniqueId: String,
|
||||
// TODO soll im master kommen?
|
||||
|
||||
idField: String,
|
||||
parentIdField: String,
|
||||
countOnly: Boolean
|
||||
@@ -216,17 +216,22 @@ export const CoreFilterCmpt = {
|
||||
}
|
||||
// Define a default tabulator options in case it was not provided
|
||||
let tabulatorOptions = {...{
|
||||
height: 500,
|
||||
layout: "fitDataStretchFrozen",
|
||||
movableColumns: true,
|
||||
columnDefaults:{
|
||||
tooltip: true
|
||||
},
|
||||
placeholder,
|
||||
reactiveData: true,
|
||||
persistence: this.persistence,
|
||||
}, ...(this.tabulatorOptions || {})};
|
||||
|
||||
// set default height if no height property is set
|
||||
if (tabulatorOptions.height === undefined &&
|
||||
tabulatorOptions.minHeight === undefined &&
|
||||
tabulatorOptions.maxHeight === undefined) {
|
||||
tabulatorOptions.height = 500;
|
||||
}
|
||||
|
||||
if (!this.tableOnly) {
|
||||
tabulatorOptions.data = this.filteredData;
|
||||
tabulatorOptions.columns = this.filteredColumns;
|
||||
@@ -234,7 +239,7 @@ export const CoreFilterCmpt = {
|
||||
|
||||
if (tabulatorOptions.selectable || (tabulatorOptions.columns && tabulatorOptions.columns.filter(el => el.formatter == 'rowSelection').length))
|
||||
this.tabulatorHasSelector = true;
|
||||
// TODO check ob im core bleiben soll
|
||||
|
||||
if (this.idField) {
|
||||
// enable nested tabulator if parent Id given
|
||||
if (this.parentIdField) tabulatorOptions.dataTree = true;
|
||||
@@ -258,7 +263,7 @@ export const CoreFilterCmpt = {
|
||||
this.tabulator.on("rowSelectionChanged", data => {
|
||||
this.selectedData = data;
|
||||
});
|
||||
// TODO check ob im core so bleiben soll
|
||||
|
||||
// if nested tabulator, restructure data
|
||||
if (this.parentIdField && this.idField) {
|
||||
this.tabulator.on("dataLoading", data => {
|
||||
@@ -575,7 +580,7 @@ export const CoreFilterCmpt = {
|
||||
this.getFilter
|
||||
);
|
||||
},
|
||||
// TODO check ob im core so bleiben soll
|
||||
|
||||
// append child to it's parent
|
||||
appendChild(data, child) {
|
||||
// get parent id
|
||||
|
||||
Reference in New Issue
Block a user