|
|
|
@ -6,7 +6,7 @@ import { create_event, delegate } from './events.js';
|
|
|
|
|
import { add_form_reset_listener, autofocus } from './misc.js';
|
|
|
|
|
import * as w from '../../warnings.js';
|
|
|
|
|
import { LOADING_ATTR_SYMBOL } from '#client/constants';
|
|
|
|
|
import { queue_idle_task } from '../task.js';
|
|
|
|
|
import { queue_idle_task, queue_micro_task } from '../task.js';
|
|
|
|
|
import { is_capture_event, is_delegated, normalize_attribute } from '../../../../utils.js';
|
|
|
|
|
import {
|
|
|
|
|
active_effect,
|
|
|
|
@ -20,7 +20,7 @@ import { clsx } from '../../../shared/attributes.js';
|
|
|
|
|
import { set_class } from './class.js';
|
|
|
|
|
import { set_style } from './style.js';
|
|
|
|
|
import { ATTACHMENT_KEY, NAMESPACE_HTML } from '../../../../constants.js';
|
|
|
|
|
import { block, branch, destroy_effect } from '../../reactivity/effects.js';
|
|
|
|
|
import { block, branch, destroy_effect, effect } from '../../reactivity/effects.js';
|
|
|
|
|
import { derived } from '../../reactivity/deriveds.js';
|
|
|
|
|
import { init_select, select_option } from './bindings/select.js';
|
|
|
|
|
|
|
|
|
@ -513,10 +513,15 @@ export function attribute_effect(
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (is_select) {
|
|
|
|
|
init_select(
|
|
|
|
|
/** @type {HTMLSelectElement} */ (element),
|
|
|
|
|
() => /** @type {Record<string | symbol, any>} */ (prev).value
|
|
|
|
|
);
|
|
|
|
|
var select = /** @type {HTMLSelectElement} */ (element);
|
|
|
|
|
|
|
|
|
|
if (!inited) {
|
|
|
|
|
effect(() => {
|
|
|
|
|
select_option(select, /** @type {Record<string | symbol, any>} */ (prev).value);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
init_select(select);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inited = true;
|
|
|
|
|