simplesvelte 2.4.0 → 2.4.1

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.
@@ -126,8 +126,8 @@
126
126
  // Remove specific item from multi-select
127
127
  function toggleItemSelection(itemValue: any) {
128
128
  if (!multiple) {
129
- // Close dropdown and update filter immediately
130
- filterInput = items.find((item) => item.value === itemValue)?.label || ''
129
+ // Close dropdown and clear filter - the derived `filter` will show the label when closed
130
+ filterInput = ''
131
131
  closeDropdown()
132
132
  value = itemValue
133
133
  if (onchange) onchange(value)
@@ -461,6 +461,8 @@
461
461
  oninput={(e) => (filterInput = e.currentTarget.value)}
462
462
  onclick={(e) => {
463
463
  e.stopPropagation()
464
+ // Clear filter when opening dropdown so all options are visible
465
+ filterInput = ''
464
466
  openDropdown()
465
467
  }}
466
468
  {placeholder}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simplesvelte",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "scripts": {
5
5
  "dev": "bun vite dev",
6
6
  "build": "bun vite build && bun run prepack",