UX: indicate that a search field is actually a regex, add feedback to the filterview

This commit is contained in:
Pieter Vander Vennet 2024-09-17 02:51:02 +02:00
parent 5da63bf83a
commit ebe7ff85f8
5 changed files with 39 additions and 7 deletions

View file

@ -60,7 +60,7 @@ export default class FilterConfig {
}
const fields: { name: string; type: ValidatorType }[] = (option.fields ?? []).map((f, i) => {
const type = <ValidatorType> f.type ?? "string"
const type = <ValidatorType> f.type ?? "regex"
if(Validators.availableTypes.indexOf(type) < 0){
throw `Invalid filter: type is not a valid validator. Did you mean one of ${Utils.sortedByLevenshteinDistance(type, <any>Validators.availableTypes, x => x).slice(0, 3)}`
}