kopia lustrzana https://github.com/shoelace-style/shoelace
Only trigger re-render on setting valueAsArray if the arrays are actually different
rodzic
867428d301
commit
34570d505d
|
@ -93,7 +93,9 @@ export default class SlMultiRange extends ShoelaceElement implements ShoelaceFor
|
||||||
set valueAsArray(value: readonly number[] | null) {
|
set valueAsArray(value: readonly number[] | null) {
|
||||||
const oldValue = this.#value;
|
const oldValue = this.#value;
|
||||||
this.#value = value || [];
|
this.#value = value || [];
|
||||||
this.requestUpdate('value', oldValue.join(','));
|
if (arraysDiffer(oldValue, this.#value)) {
|
||||||
|
this.requestUpdate('value', oldValue.join(','));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
get valueAsArray() {
|
get valueAsArray() {
|
||||||
return this.#value;
|
return this.#value;
|
||||||
|
|
Ładowanie…
Reference in New Issue