forked from MapComplete/MapComplete
Fix: don't show radiobuttons if only one option is available
This commit is contained in:
parent
e34e39d20f
commit
8e68ca03ab
1 changed files with 6 additions and 1 deletions
|
@ -37,7 +37,12 @@
|
||||||
let selectedMapping: number = undefined;
|
let selectedMapping: number = undefined;
|
||||||
let checkedMappings: boolean[];
|
let checkedMappings: boolean[];
|
||||||
$: {
|
$: {
|
||||||
mappings = config.mappings
|
mappings = config.mappings?.filter(m => {
|
||||||
|
if(typeof m.hideInAnswer === "boolean"){
|
||||||
|
return !m.hideInAnswer
|
||||||
|
}
|
||||||
|
return m.hideInAnswer.matchesProperties(tags.data)
|
||||||
|
})
|
||||||
// We received a new config -> reinit
|
// We received a new config -> reinit
|
||||||
console.log("Initing checkedMappings for", config)
|
console.log("Initing checkedMappings for", config)
|
||||||
if (config.mappings?.length > 0 && (checkedMappings === undefined || checkedMappings?.length < config.mappings.length)) {
|
if (config.mappings?.length > 0 && (checkedMappings === undefined || checkedMappings?.length < config.mappings.length)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue