]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/models/cd-table-column.ts
import 15.2.0 Octopus source
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / models / cd-table-column.ts
index 69194e8b88d77f49fd386f5823fd682cc630db12..4ed5fdd588fe4ddaadf51b92875699e49f9b8dc8 100644 (file)
@@ -6,4 +6,33 @@ export interface CdTableColumn extends TableColumn {
   cellTransformation?: CellTemplate;
   isHidden?: boolean;
   prop: TableColumnProp; // Enforces properties to get sortable columns
+  customTemplateConfig?: any; // Custom configuration used by cell templates.
+
+  /**
+   * Add a filter for the column if true.
+   *
+   * By default, options for the filter are deduced from values of the column.
+   */
+  filterable?: boolean;
+
+  /**
+   * Use these options for filter rather than deducing from values of the column.
+   *
+   * If there is a pipe function associated with the column, pipe function is applied
+   * to the options before displaying them.
+   */
+  filterOptions?: any[];
+
+  /**
+   * Default applied option, should be value in filterOptions.
+   */
+  filterInitValue?: any;
+
+  /**
+   * Specify a custom function for filtering.
+   *
+   * By default, the filter compares if values are string-equal with options. Specify
+   * a customize function if that's not desired. Return true to include a row.
+   */
+  filterPredicate?: (row: any, value: any) => boolean;
 }