Skip to content

Commit

Permalink
Update float field so it uses step='any'
Browse files Browse the repository at this point in the history
This way you don't have a fixed amount of numbers after the comma
  • Loading branch information
Joossensei committed Mar 15, 2022
1 parent ddaadc9 commit 7ab2374
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/js/app/editor/Components/Number.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default {
id: String,
value: String,
name: String,
step: Number,
step: Number | String,
type: String,
disabled: Boolean,
required: Boolean,
Expand Down
2 changes: 1 addition & 1 deletion templates/_partials/fields/number.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down

0 comments on commit 7ab2374

Please sign in to comment.