|
|
@ -53,8 +53,11 @@ export function bind_value(input, get_value, update) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** @type {Set<HTMLInputElement[]>} */
|
|
|
|
|
|
|
|
const pending = new Set();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @param {Array<HTMLInputElement>} inputs
|
|
|
|
* @param {HTMLInputElement[]} inputs
|
|
|
|
* @param {null | [number]} group_index
|
|
|
|
* @param {null | [number]} group_index
|
|
|
|
* @param {HTMLInputElement} input
|
|
|
|
* @param {HTMLInputElement} input
|
|
|
|
* @param {() => unknown} get_value
|
|
|
|
* @param {() => unknown} get_value
|
|
|
@ -127,10 +130,17 @@ export function bind_group(inputs, group_index, input, get_value, update) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!pending.has(binding_group)) {
|
|
|
|
|
|
|
|
pending.add(binding_group);
|
|
|
|
|
|
|
|
|
|
|
|
queue_micro_task(() => {
|
|
|
|
queue_micro_task(() => {
|
|
|
|
// necessary to maintain binding group order in all insertion scenarios. TODO optimise
|
|
|
|
// necessary to maintain binding group order in all insertion scenarios
|
|
|
|
binding_group.sort((a, b) => (a.compareDocumentPosition(b) === 4 ? -1 : 1));
|
|
|
|
binding_group.sort((a, b) => (a.compareDocumentPosition(b) === 4 ? -1 : 1));
|
|
|
|
|
|
|
|
pending.delete(binding_group);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
queue_micro_task(() => {
|
|
|
|
if (hydration_mismatch) {
|
|
|
|
if (hydration_mismatch) {
|
|
|
|
var value;
|
|
|
|
var value;
|
|
|
|
|
|
|
|
|
|
|
|