hyperapp-multiselect
v0.0.11
Published
Minimal multiselect with search capabilities
Downloads
3
Maintainers
Readme
Hyperapp Multiselect
A Multiselect built with Hyperapp framework.
Install
npm i hyperapp-multiselect
Integration
import MultiSelect from "hyperapp-multiselect";
const state = {
carBrandSelect: MultiSelect.initialState
};
const actions = {
carBrandSelect: MultiSelect.actions
};
const view = (state, actions) => {
const { carBrandSelect: multiSelectState } = state;
const { carBrandSelect: multiSelectActions } = actions;
return (
<div>
<MultiSelect
state={multiSelectState}
actions={multiSelectActions}
isFilterable
canSelectAll
dropdownIcon={CustomDropdownArrowIcon}
filterIcon={CustomFilterIcon}
/>
</div>
);
};
const myApp = app(state, actions, view, document.body);
// fills in options
myApp.carBrandSelect.updateOptions(['GM', 'Toyota', 'Volkswagen'...])
License
MIT licensed. See LICENSE.