mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Table: Adds column filtering (#27225)
* Table: Adds column filters * Refactor: adds filter by value function * Refactor: some styling and sorting * Refactor: Moves filterByValue to utils * Tests: add filterByValue tests * Refactor: simplifies filteredValues * Refactor: adds dropshadow * Refactor: keeps icons together with label and aligns with column alignment * Refactor: hides clear filter if no filter is active * Refactor: changes how values in filter are populated * Refactor: adds filterable field override * Tests: fixed broken tests * Refactor: adds FilterList * Refactor: adds blanks entry for non value labels * Refactor: using preFilteredRows in filter list * Refactor: adds filter input * Refactor: fixes issue found by e2e * Refactor: changes after PR comments * Docs: adds documentation for Column filter * Refactor: moves functions to utils and adds tests * Refactor: memoizes filter function * Docs: reverts docs for now
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { PanelPlugin } from '@grafana/data';
|
||||
import { TablePanel } from './TablePanel';
|
||||
import { CustomFieldConfig, Options } from './types';
|
||||
import { tablePanelChangedHandler, tableMigrationHandler } from './migrations';
|
||||
import { tableMigrationHandler, tablePanelChangedHandler } from './migrations';
|
||||
import { TableCellDisplayMode } from '@grafana/ui';
|
||||
|
||||
export const plugin = new PanelPlugin<Options, CustomFieldConfig>(TablePanel)
|
||||
@@ -49,6 +49,12 @@ export const plugin = new PanelPlugin<Options, CustomFieldConfig>(TablePanel)
|
||||
{ value: TableCellDisplayMode.JSONView, label: 'JSON View' },
|
||||
],
|
||||
},
|
||||
})
|
||||
.addBooleanSwitch({
|
||||
path: 'filterable',
|
||||
name: 'Column filter',
|
||||
description: 'Enables/disables field filters in table',
|
||||
defaultValue: false,
|
||||
});
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user