Browse Source

Merge pull request #14449 from grafana/14437-tag-filter

Filter tags select box on text input #14437
Torkel Ödegaard 7 years ago
parent
commit
076a1be03a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      public/app/core/components/TagFilter/TagFilter.tsx

+ 4 - 0
public/app/core/components/TagFilter/TagFilter.tsx

@@ -51,6 +51,10 @@ export class TagFilter extends React.Component<Props, any> {
       getOptionLabel: i => i.label,
       value: tags,
       styles: ResetStyles,
+      filterOption: (option, searchQuery) => {
+        const regex = RegExp(searchQuery, 'i');
+        return regex.test(option.value);
+      },
       components: {
         Option: TagOption,
         IndicatorsContainer,