Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
feat(filter-field): Added highlighting of the currend input value to …
Browse files Browse the repository at this point in the history
…the options.

fixes #203
  • Loading branch information
thomaspink authored and lukasholzer committed Feb 4, 2020
1 parent 407dc6c commit 1effd08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions components/filter-field/src/filter-field-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { DtFilterField } from './filter-field';
import { DtFilterFieldRange } from './filter-field-range/filter-field-range';
import { DtFilterFieldRangeTrigger } from './filter-field-range/filter-field-range-trigger';
import { DtFilterFieldTag } from './filter-field-tag/filter-field-tag';
import { DtHighlightModule } from '@dynatrace/barista-components/highlight';

@NgModule({
imports: [
Expand All @@ -42,6 +43,7 @@ import { DtFilterFieldTag } from './filter-field-tag/filter-field-tag';
DtButtonGroupModule,
DtLoadingDistractorModule,
DtOverlayModule,
DtHighlightModule,
],
exports: [
DtAutocompleteModule,
Expand Down
8 changes: 6 additions & 2 deletions components/filter-field/src/filter-field.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@
<dt-option
*ngFor="let optionDef of optionOrGroupDef.group!.options"
[value]="optionDef"
>{{optionDef.option!.viewValue}}</dt-option>
>
<dt-highlight [term]="_inputValue">{{optionDef.option!.viewValue}}</dt-highlight>
</dt-option>
</dt-optgroup>
<ng-template #options>
<dt-option [value]="optionOrGroupDef">{{ optionOrGroupDef.option!.viewValue}}</dt-option>
<dt-option [value]="optionOrGroupDef">
<dt-highlight [term]="_inputValue">{{ optionOrGroupDef.option!.viewValue}}</dt-highlight>
</dt-option>
</ng-template>
</ng-container>
</dt-autocomplete>
Expand Down

0 comments on commit 1effd08

Please sign in to comment.