-
Notifications
You must be signed in to change notification settings - Fork 78
[quick-filter] use internal id path from filter field and not require it in the data source #1647
Comments
Currently, the quick-filter component requires a export interface DtQuickFilterDefaultDataSourceSimpleOption {
name: string;
} The // if the option is distinct we only have to check for the groups name because
// there can only be one distinct option selected so we know immediately if it is selected
if (distinct && parts[0] === path[0].name) {
return true;
}
// if it is not distinct we have to build the full path out of the current filters to check
// wether the path matches them provided node definition
const dataPath = path.reduce(
(previousValue, currentValue) =>
`${previousValue.name}${DELIMITER}${currentValue.name}${DELIMITER}`,
);
// if the built path for the filters inside the array is equal to the option
// in the provided nodeDef then we found our selected option
if (item.option.uid === dataPath) {
return true;
} and where the paths are built for the filters to set the import { DELIMITER } from '@dynatrace/barista-components/filter-field';
export function buildIdPathsFromFilters(filters: any[][]): string[] {
return filters.map((path) =>
path.reduce(
(previousValue, currentValue) =>
`${previousValue.name}${DELIMITER}${currentValue.name}${DELIMITER}`,
),
);
} Maybe @thomaspink can provide some insights on how to handle it for the filter-field. |
The filter field creates a |
This issue should be a further step to make the quick filter stable. Fixes dynatrace-oss#1647 Fixes dynatrace-oss#1522
No description provided.
The text was updated successfully, but these errors were encountered: