forked from MapComplete/MapComplete
UX: indicate that a search field is actually a regex, add feedback to the filterview
This commit is contained in:
parent
5da63bf83a
commit
ebe7ff85f8
5 changed files with 39 additions and 7 deletions
|
|
@ -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)}`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue