Support date properties in facet search - change default type

This commit is contained in:
flammermann 2024-01-02 21:50:03 +00:00 committed by Yohan Boniface
parent 4de6bc6c91
commit ba88dfafcd
2 changed files with 3 additions and 3 deletions

View file

@ -541,7 +541,7 @@ U.Help = L.Class.extend({
slugKey: L._('The name of the property to use as feature unique identifier.'),
filterKey: L._('Comma separated list of properties to use when filtering features'),
facetKey: L._(
'Comma separated list of properties to use for facet search (eg.: mykey,otherkey). To control label, add it after a | (eg.: mykey|My Key,otherkey|Other Key). To control type, add it after another | (eg.: mykey|My Key|checkbox,otherkey|Other Key|date)'
'Comma separated list of properties to use for facet search (eg.: mykey,otherkey). To control label, add it after a | (eg.: mykey|My Key,otherkey|Other Key). To control data type, add it after another | (eg.: mykey|My Key|enum,otherkey|Other Key|date)'
),
interactive: L._(
'If false, the polygon or line will act as a part of the underlying map.'

View file

@ -1236,7 +1236,7 @@ U.Map = L.Map.extend({
{
handler: 'Input',
helpEntries: 'facetKey',
placeholder: L._('Example: key1,key2|Label 2,key3|Label 3|checkbox'),
placeholder: L._('Example: key1,key2|Label 2,key3|Label 3|enum'),
label: L._('Facet keys'),
},
],
@ -1850,7 +1850,7 @@ U.Map = L.Map.extend({
const els = curr.split('|')
acc[els[0]] = {
"label": els[1] || els[0],
"type": els[2] || "checkbox"
"type": els[2] || "enum"
}
return acc
}, {})