1.0.0-fixes • Published 3 years ago

svselect v1.0.0-fixes

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

🔍 svselect

Easy to use Select inputs.

Exports the Select component:

interface Param {
	label: string;
	key: string | number;
	custom?: boolean;
}

interface SelectParams {
	options?: Param[];
	multiple?: boolean;
	allowcreate?: boolean;
	hideselected?: boolean;
	onChange?: (
		newValue: Param[] | Param,
		oldValue: Param[] | Param
	) => boolean;
	selected?: Param[] | Param;
	placeholder?: string;
	id?: string;
	style?: string;
	getSelected?: () => Param[] | Param;
}

To use the getSelected function, use the bind:this derivative.

<script>
	// ... imports
	let selectBox; // call `selectBox.getSelected()`
</script>

<select bind:this="{selectBox}" allowcreate {options} />

OR

<script>
	// ... imports
	let getUserSelected; // call this whenever you want
</script>

<select bind:getSelected="{getUserSelected}" allowcreate {options} />

Made to fit in with Bootstrap. You should be able to integrate this seemlessly without a styling hassle.

1.0.0-fixes

3 years ago

1.0.0-types2

3 years ago

1.0.0-types1

3 years ago

1.0.0-types

3 years ago

1.0.0

3 years ago

0.1.12-tt

3 years ago

0.1.12-t

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.1-f

3 years ago

0.1.1

3 years ago

0.1.0-f2

3 years ago

0.1.0-f1

3 years ago

0.1.0-f

3 years ago

0.1.0-g1

3 years ago

0.1.0-g

3 years ago

0.1.0-h1

3 years ago

0.1.0-h

3 years ago

0.1.0

3 years ago

0.0.11

3 years ago

0.0.1

3 years ago