Closed domialbrecht closed 1 year ago
If loadOptions is used together with groupBy, and the list has already loaded once but no active filterText, filterGroupedItems is executed twice. This leaves unassigned groupHeader at the top of the list.
As far as I can tell this is from here: https://github.com/rob-balfre/svelte-select/blob/2c0cf04a8aec6f320620317c87fcc25b644a221c/src/lib/filter.js#L15
with filterText.length === 0 filterGroupedItems is still executed at the bottom https://github.com/rob-balfre/svelte-select/blob/2c0cf04a8aec6f320620317c87fcc25b644a221c/src/lib/filter.js#L36
REPL: https://svelte.dev/repl/d9280f63ae89431ca67e66137fc67be4?version=3.52.0
@Sirfilior nice, thanks. Will fix up
Fixed in 5.0.0-beta.40
5.0.0-beta.40
If loadOptions is used together with groupBy, and the list has already loaded once but no active filterText, filterGroupedItems is executed twice. This leaves unassigned groupHeader at the top of the list.
As far as I can tell this is from here: https://github.com/rob-balfre/svelte-select/blob/2c0cf04a8aec6f320620317c87fcc25b644a221c/src/lib/filter.js#L15
with filterText.length === 0 filterGroupedItems is still executed at the bottom https://github.com/rob-balfre/svelte-select/blob/2c0cf04a8aec6f320620317c87fcc25b644a221c/src/lib/filter.js#L36
REPL: https://svelte.dev/repl/d9280f63ae89431ca67e66137fc67be4?version=3.52.0