diff --git a/assets/css/utils.scss b/assets/css/utils.scss
index 7165f8ccd4..860252a8ee 100644
--- a/assets/css/utils.scss
+++ b/assets/css/utils.scss
@@ -92,3 +92,15 @@ li > a.text-danger // very specific selector for bootstrap dropdown
-ms-user-select: none; /* IE 10 and IE 11 */
user-select: none; /* Standard syntax */
}
+
+/* Chrome, Safari, Edge, Opera */
+input::-webkit-outer-spin-button.no-number-input-arrow,
+input::-webkit-inner-spin-button.no-number-input-arrow {
+ -webkit-appearance: none;
+ margin: 0;
+}
+
+/* Firefox */
+input[type=number].no-number-input-arrow {
+ -moz-appearance: textfield;
+}
\ No newline at end of file
diff --git a/js/app/components/PriceRangeEditor.js b/js/app/components/PriceRangeEditor.js
index df695c9139..2677812152 100644
--- a/js/app/components/PriceRangeEditor.js
+++ b/js/app/components/PriceRangeEditor.js
@@ -1,4 +1,4 @@
-import React, { useState, useRef } from 'react'
+import React, { useState, useRef, useEffect } from 'react'
import { getCurrencySymbol } from '../i18n'
import { useTranslation } from 'react-i18next'
@@ -75,22 +75,30 @@ export default ({ defaultValue, onChange }) => {
const stepEl = useRef(null)
const thresholdEl = useRef(null)
+ const initialLoad = useRef(true)
+
+ useEffect(() => {
+ if (!initialLoad.current) {
+ onChange({
+ attribute,
+ price: price,
+ step,
+ threshold,
+ })
+ } else {
+ initialLoad.current = false
+ }
+ }, [price, threshold, attribute, step])
return (
@@ -102,12 +110,6 @@ export default ({ defaultValue, onChange }) => {
style={{ width: '80px' }}
onChange={ e => {
setStep(multiplyIfNeeded(e.target.value, unit))
- onChange({
- attribute,
- price,
- step: multiplyIfNeeded(e.target.value, unit),
- threshold: multiplyIfNeeded(thresholdEl.current.value, e.target.value),
- })
}} />