svelte-select-5 6.1.7 → 6.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Select.svelte CHANGED
@@ -163,7 +163,6 @@
163
163
  let _inputAttributes = $state({});
164
164
  let prevJustValue = $state(undefined);
165
165
  let isScrollingTimer;
166
- let autoUpdateInitialized = false;
167
166
 
168
167
  // Floating UI config - using closure for listOffset to capture current value
169
168
  let _floatingConfig = {
@@ -809,11 +808,9 @@
809
808
  });
810
809
 
811
810
  // Read-only props - always reflect current state, external changes are ignored
812
- $effect(() => {
811
+ // Using $effect.pre to update before DOM render for better synchronization
812
+ $effect.pre(() => {
813
813
  readonlyValue = value;
814
- });
815
-
816
- $effect(() => {
817
814
  readonlyId = computeJustValue();
818
815
  });
819
816
 
@@ -853,13 +850,6 @@
853
850
  if (filterText) hoverItemIndex = 0;
854
851
  });
855
852
 
856
- $effect(() => {
857
- if (container && !autoUpdateInitialized && floatingConfig?.autoUpdate === undefined) {
858
- autoUpdateInitialized = true;
859
- _floatingConfig.autoUpdate = true;
860
- }
861
- });
862
-
863
853
  // Lifecycle
864
854
  onMount(() => {
865
855
  if (listOpen) focused = true;
@@ -163,7 +163,6 @@
163
163
  let _inputAttributes = $state({});
164
164
  let prevJustValue = $state(undefined);
165
165
  let isScrollingTimer;
166
- let autoUpdateInitialized = false;
167
166
 
168
167
  // Floating UI config - using closure for listOffset to capture current value
169
168
  let _floatingConfig = {
@@ -809,11 +808,9 @@
809
808
  });
810
809
 
811
810
  // Read-only props - always reflect current state, external changes are ignored
812
- $effect(() => {
811
+ // Using $effect.pre to update before DOM render for better synchronization
812
+ $effect.pre(() => {
813
813
  readonlyValue = value;
814
- });
815
-
816
- $effect(() => {
817
814
  readonlyId = computeJustValue();
818
815
  });
819
816
 
@@ -853,13 +850,6 @@
853
850
  if (filterText) hoverItemIndex = 0;
854
851
  });
855
852
 
856
- $effect(() => {
857
- if (container && !autoUpdateInitialized && floatingConfig?.autoUpdate === undefined) {
858
- autoUpdateInitialized = true;
859
- _floatingConfig.autoUpdate = true;
860
- }
861
- });
862
-
863
853
  // Lifecycle
864
854
  onMount(() => {
865
855
  if (listOpen) focused = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte-select-5",
3
- "version": "6.1.7",
3
+ "version": "6.1.9",
4
4
  "description": "A <Select> component for Svelte 5 apps (fork of svelte-select)",
5
5
  "repository": "https://github.com/Dbone29/svelte-select-5.git",
6
6
  "author": "Robert Balfré <rob.balfre@gmail.com> (https://github.com/rob-balfre)",