Skip to content

Commit

Permalink
Fix type "number" for list separator in sitemap designer (#950)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Haunschmied <[email protected]>
  • Loading branch information
DarkC35 authored and ghys committed Apr 18, 2021
1 parent 2142c8e commit a00b436
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<f7-list-input v-if="supports('minValue')" label="Minimum" type="number" :value="widget.config.minValue" @input="updateParameter('minValue', $event)" clear-button />
<f7-list-input v-if="supports('maxValue')" label="Maximum" type="number" :value="widget.config.maxValue" @input="updateParameter('maxValue', $event)" clear-button />
<f7-list-input v-if="supports('step')" label="Step" type="number" :value="widget.config.step" @input="updateParameter('step', $event)" clear-button />
<f7-list-input v-if="supports('separator')" label="Separator" type="number" :value="widget.config.separator" @input="updateParameter('separator', $event)" clear-button />
<f7-list-input v-if="supports('separator')" label="Separator" type="text" :value="widget.config.separator" @input="updateParameter('separator', $event)" clear-button />
<f7-list-item v-if="supports('switchEnabled')" title="Switch enabled">
<f7-toggle slot="after" :checked="widget.config.switchEnabled" @toggle:change="widget.config.switchEnabled = $event"></f7-toggle>
</f7-list-item>
Expand Down Expand Up @@ -99,7 +99,7 @@ export default {
},
updateParameter (parameter, $event) {
let value = $event.target.value
if (value && !isNaN(value)) {
if (value && $event.target.type === 'number' && !isNaN(value)) {
value = parseFloat(value)
}
this.$set(this.widget.config, parameter, value)
Expand Down

0 comments on commit a00b436

Please sign in to comment.