// the selected fields will be hidden.
@Input() hideFields: string;
+ // When true, only display columns that are declared in the markup
+ // and leave all auto-generated fields hidden.
+ @Input() showDeclaredFieldsOnly: boolean;
+
// Allow the caller to jump directly to a specific page of
// grid data.
@Input() pageOffset: number;
this.context.showLinkSelectors = this.showLinkSelectors === true;
this.context.disableMultiSelect = this.disableMultiSelect === true;
this.context.rowFlairIsEnabled = this.rowFlairIsEnabled === true;
+ this.context.showDeclaredFieldsOnly = this.showDeclaredFieldsOnly;
this.context.rowFlairCallback = this.rowFlairCallback;
this.context.disablePaging = this.disablePaging === true;
if (this.showFields) {
if (idx === 0) {
this.columns.unshift(col);
} else {
- this.columns.splice(idx - 1, 0, col);
+ this.columns.splice(idx, 0, col);
}
return true;
}
overflowCells: boolean;
showLinkSelectors: boolean;
disablePaging: boolean;
+ showDeclaredFieldsOnly: boolean;
// Allow calling code to know when the select-all-rows-in-page
// action has occurred.
}
}
+ if (this.showDeclaredFieldsOnly) {
+ col.hidden = true;
+ }
+
this.columnSet.add(col);
});
}