svelecte

Flexible autocomplete/select component written in Svelte,

MIT License

Downloads
24.5K
Stars
459
Committers
11
svelecte -

Published by mskocik almost 3 years ago

Fixes:

  • fix assignment to constant (#51)
svelecte -

Published by mskocik almost 3 years ago

New features:

  • added blur event (#50)
svelecte -

Published by mskocik almost 3 years ago

New features:

  • support for svelte-use-form validators on internal <select> element. (#48)
svelecte -

Published by mskocik almost 3 years ago

Fixes:

  • spacebar behaviour with fetch prop (#47)
  • Show how many more characters needed to type before executing search query
  • svelecte-element.js now built as IIFE available under public property Svelecte in the browser
svelecte -

Published by mskocik almost 3 years ago

💥 Breaking changes

  • value property is reactive (#41), which results in:
    • removed selection property
    • introduced readSelection property - behaves as the selection one, but it is read-only now
    • value property by default accepts valueField value. If you were using Svelecte with objects as bound values, set valueAsObject
// v2.3.2 and below - you could assign object or array of objects as selection property
<Svelecte bind:selection={myObject}></Svelecte>

/** v3.0+ */ 
// `value` property handle selection and it binds value property of the object
<Svelecte bind:value={myProp}></Svelecte>
// if object is desired, set 'valueAsObject' property
<Svelecte bind:value={myObject} valueAsObject></Svelecte>

✌ New features:

  • drag and drop support (#45)
svelecte -

Published by mskocik about 3 years ago

Fixes:

  • fix broken SSR due browser-specific API (introduced in v2.3.1) (#43)
svelecte -

Published by mskocik about 3 years ago

Fixes:

  • do not store created items, when fetch is defined (#42)
  • use iOS meta key (and show it as as shortcut) when creating item by keyboard
svelecte -

Published by mskocik about 3 years ago

New:

  • added minQuery option to require minimum input length, before trigger fetch request (#40)

Fixes:

  • fixed binding value multiple times (#39) - reworked completely how initial selection is resolved
  • fix hover not showing on create row
svelecte -

Published by mskocik about 3 years ago

New:

  • added i18n property to enable customization of config.i18n settings on component level

Fixes:

  • proper dropdown initialization (bottom or up) when virtualList is true
svelecte -

Published by mskocik about 3 years ago

Good news! 🎉

The custom-element version and documentation is back in main repo to ease further development for me (and possibly others) 😉

New features:

  • fully compatible custom-element version
  • added customizable i18n option (function) for label on 'create row', which now also supports HTML markup
svelecte -

Published by mskocik about 3 years ago

Fixes:

  • correct context getter (#35)
svelecte -

Published by mskocik about 3 years ago

New features:

  • Possible to edit created items (#30)

Fixes:

  • Rework how svelecte works internally with options array (#32)

New options:

  • disabledField - which property should mark given item as disabled, to handle BC break mentioned below
  • allowEditing - toggle to edit newly created item
  • keepCreated -whether add newly created items to option list

Breaking changes

  • new default value for resolving disabled status of option items, but now configurable
svelecte -

Published by mskocik about 3 years ago

Fixes:

  • spinner position when creatable is true
  • set fetch property to null, only when parent svelecte is defined (internal API for custom-element)
svelecte -

Published by mskocik about 3 years ago

New:

  • event createoption when creating new option (via #31)
svelecte -

Published by mskocik about 3 years ago

Add fetchCallback as module config property (defaults to `null)

svelecte -

Published by mskocik about 3 years ago

Fixes:

  • add missing height parameter to dropdown icon, #29
svelecte -

Published by mskocik about 3 years ago

Fixes:

  • call stack exceeded with fetch property set and navigating through empty dropdown, #26

Internal:

  • update of dependencies and removing warning of module-script-reactive-declaration, #25
svelecte -

Published by mskocik over 3 years ago

Fixes:

  • issue with preselected items #24
svelecte -

Published by mskocik over 3 years ago

Fixes:

  • fix fetch-related issue on data having custom data structure, #23
svelecte -

Published by mskocik over 3 years ago

New options:

  • disableSifter via #19
  • disableHighlight via #20
  • resetOnBlur based on suggestion in #19
  • fetchResetOnBlur based on suggestion in #19

bug fixes:

  • #21
  • #22

breaking changes:

  • anchor prop replaced by hasAnchor. #22
Package Rankings
Top 2.59% on Npmjs.org
Badges
Extracted from project README
NPM version
Related Projects