1.0.3 • Published 1 year ago

svelte-searchable-select v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Svelte Searchable Select

Searchalbe and multiple select for Svelte Npm Link: https://www.npmjs.com/package/svelte-searchable-select Github Repository: https://github.com/ariferol01/svelte-searchable-select

enter image description here

Installation

Available on NPM

$ npm i svelte-searchable-select

How to use

<script>

  

import Select from "svelte-searchable-select";

  

let countries = [

{

name: 'United States',

iso_3: 'USA',

phone_code: '+1'

},

{

name: 'United Kingdom',

iso_3: 'GBR',

phone_code: '+44'

},

{

name: 'Türkiye',

iso_3: 'TUR',

phone_code: '+90'

},

  

];

  

let selectedCountries = [];

  

$:console.log('Selected Countries: ', selectedCountries);

  

</script>

  

<Select

bind:result={selectedCountries}

fields={countries}

text={'name'}

multiple={true}

className={'form-control'}

selectedsClass={"rounded p-2"}

placeholderText={"Select Country"}

/>

For binding items array to fields (bind:fields)

  

<Select

bind:result={selectedCountries}

bind:fields={countries}

text={'name'}

multiple={true}

className={'form-control'}

selectedsClass={"rounded p-2"}

placeholderText={"Select Country"}

/>

For selected default fields

let selectedCountries = [countries[1]];
acorn-jsxansi-regexajvacornargparseanymatcharray-unionansi-stylesbalanced-matchbinary-extensionsbrace-expansionbuffer-crc32busboybracescallsiteschalkchokidarcookiecolor-convertcolor-nameconcat-mapcross-spawndeep-isdeepmergedebugdetect-indentdevalueesbuilddoctrinedir-globes6-promiseescape-string-regexpeslint-scopeeslint-visitor-keysespreeeslint-utilsesm-envesqueryesutilsesrecurseestraversefast-deep-equalfast-json-stable-stringifyfastqfast-globfast-levenshteinfile-entry-cachefind-upflattedfs.realpathfill-rangefunction-bindglobflat-cacheglob-parentglobalsglobalyzerglobbygrapheme-splittergraceful-fshashas-flagignoreimport-meta-resolveglobreximport-freshimurmurhashis-core-moduleinflightis-binary-pathis-globis-extglobinheritsis-numberis-path-insidejs-yamlisexejs-sdsljson-schema-traversejson-stable-stringify-without-jsonifylevnkleurlocate-pathmagic-stringmerge2lru-cachemicromatchlodash.mergemimemin-indentmrmimeminimatchminimistmrimkdirpnatural-comparemsnatural-compare-litenanoidp-limitnormalize-pathonceoptionatorparent-modulep-locatepath-existspath-keypath-is-absolutepath-typepostcsspath-parsepicocolorspicomatchprelude-lspunycodereaddirpqueue-microtaskregexppreusifyresolve-fromrollupresolverimrafsemverrun-parallelsadesanderset-cookie-parsersirvshebang-commandshebang-regexslashsource-map-jssorcerystreamsearchstrip-ansistrip-indentsupports-colorstrip-json-commentssvelte-hmrsupports-preserve-symlinks-flagsvelte-preprocesstext-tabletiny-globto-regex-rangetotalisttype-checktsutilsundicivitefutype-festwhichuri-jsword-wrapyocto-queueyallistwrappy
1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago