forked from MapComplete/MapComplete
Fix: fix #2495
This commit is contained in:
parent
0601a9df6f
commit
0452c84520
1 changed files with 3 additions and 2 deletions
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
import type { Feature } from "geojson"
|
||||
import type { SpecialVisualizationState } from "../SpecialVisualization"
|
||||
import type { Validator } from "./Validator"
|
||||
import DistanceInput from "./Helpers/DistanceInput.svelte"
|
||||
|
||||
export let type: ValidatorType
|
||||
|
|
@ -14,11 +13,13 @@
|
|||
export let args: (string | number | boolean)[] | any = undefined
|
||||
export let state: SpecialVisualizationState = undefined
|
||||
let validator = Validators.get(type)
|
||||
let validatorHelper: Validator = validator.inputHelper
|
||||
let validatorHelper = validator.inputHelper
|
||||
</script>
|
||||
|
||||
{#if type === "distance"}
|
||||
<DistanceInput {value} {feature} {state} {args} />
|
||||
{:else if validatorHelper !== undefined}
|
||||
<svelte:component this={validatorHelper} {value} {feature} {state} {args} on:submit />
|
||||
{:else}
|
||||
<slot name="fallback"/> <!-- Used in the FilterWithView to inject the helper -->
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue