From 7ab2374834b6075e51131a845b51e336808b4c8d Mon Sep 17 00:00:00 2001 From: Joossensei Date: Tue, 15 Mar 2022 14:04:19 +0100 Subject: [PATCH] Update float field so it uses step='any' This way you don't have a fixed amount of numbers after the comma --- assets/js/app/editor/Components/Number.vue | 2 +- templates/_partials/fields/number.html.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/app/editor/Components/Number.vue b/assets/js/app/editor/Components/Number.vue index d5e5cc915..1e70bca50 100644 --- a/assets/js/app/editor/Components/Number.vue +++ b/assets/js/app/editor/Components/Number.vue @@ -26,7 +26,7 @@ export default { id: String, value: String, name: String, - step: Number, + step: Number | String, type: String, disabled: Boolean, required: Boolean, diff --git a/templates/_partials/fields/number.html.twig b/templates/_partials/fields/number.html.twig index ef9049413..b42990fa4 100644 --- a/templates/_partials/fields/number.html.twig +++ b/templates/_partials/fields/number.html.twig @@ -13,7 +13,7 @@ {% elseif not step|default %} {# default step values #} {% if mode == 'float' %} - {% set step = 0.5 %} + {% set step = "'any'" %} {% elseif mode == 'integer' %} {% set step = 1 %} {% else %}