Skip to content

Commit

Permalink
ensure config.optionProps are updated when options change, fix #274
Browse files Browse the repository at this point in the history
  • Loading branch information
mskocik committed Jan 6, 2025
1 parent 8715036 commit 1914443
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/Svelecte.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,9 @@
function watch_options(opts) {
if (options_stopgap === opts) return;
// make sure, it's an array
opts = ensureObjectArray(opts, currentValueField, currentLabelField);
opts = flatList( // although valid data is passed, `flatList` must be run, to update optionProps
ensureObjectArray(opts, currentValueField, currentLabelField), itemConfig
);
// do these automatic re-adjustments only when props are not specified
if (!valueField) {
Expand Down

0 comments on commit 1914443

Please sign in to comment.