Native Selectivity Angular2 component
- A recommended way to install ng2-selectivity is through npm package manager using the following command:
npm i ng2-selectivity --save
Alternatively, you can download it in a ZIP file.
-
Include
ng2-selectivity.cssin your project -
More information regardidocng using of ng2-selectivity is located in demo and demo sources.
items- (Array<any>) - Array of items from which to select. Should be an array of objects withidandtextproperties. As convenience, you may also pass an array of strings, in which case the same string is used for both the ID and the text. Items may be nested by adding achildrenproperty to any item, whose value should be another array of items. Items that have children may omit having an ID. Ifitemsare specified, all items are expected to be available locally and all selection operations operate on this local array only. If omitted, items are not available locally, and thequeryoption should be provided to fetch data.allowClear(?boolean=false) (not yet supported) - Set totrueto allow the selection to be cleared. This option only applies to single-value inputs.placeholder(?string='') - Placeholder text to display when the element has no focus and selected items.multiple- (?boolean=false) - Mode of this component. If settrueuser can select more than one option.showSearchInputInDropdown- (?boolean=true) (not yet supported) - Set tofalseto remove the search input used in dropdowns. This option only applies to single-value inputs, as multiple-value inputs don't have the search input in the dropdown to begin with.
Please follow this guidelines when reporting bugs and feature requests:
- Use GitHub Issues board to report bugs and feature requests (not our email address)
- Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.
Thanks for understanding!
The MIT License (see the LICENSE file for the full text)