1.3.6 • Published 4 years ago

amo-angular-multiselect v1.3.6

Weekly downloads
265
License
MIT
Repository
github
Last release
4 years ago

AngularJS Multiselect Build Status

AngularJS multiselect component based off ngOptions.

Dependencies

Installation

npm

npm i amo-angular-multiselect

Bower

bower install amo-angular-multiselect

Usage

Declare a dependency on the amo.multiselect module:

angular.module('myModule', ['amo.multiselect']);

and add the amoMultiselect directive to your template:

<amo-multiselect
    ng-model="app.model"
    options="option.id as option.label for option in app.options">
</amo-multiselect>

where the value of options is of the following form:

[select as] label [group by group] for value in array

KeywordDescription
selectThe result of this expression will be bound to the model of the parent <amo-multiselect> element. If not specified, select expression will default to value.
labelThe result of this expression will be the label for each option.
groupThe result of this expression will be used to group options.
valueLocal variable which will refer to each item in the array during iteration.
arrayAn expression which evaluates to an array.

Settings

The following settings can be set on a per-instance basis via dasherized <amo-multiselect> attributes. Some settings can be set globally via camel cased amoMultiselectConfig constant properties.

NameTypeGlobalDefaultDescription
conjunctionText@stringYesandCoordinating conjunction text used to join option labels
deselectAllText@stringYesDeselect AllDeselect all option label text
filterText@stringYesSearch...Search filter input placeholder text
isDeselectAllEnabled<booleanYestrueState of deselect all functionality
isDisabled<booleanNofalseState of dropdown toggle functionality
isFilterEnabled<booleanYestrueState of search filter input visibility
isSelectAllEnabled<booleanYestrueState of select all functionality
label&stringNoExpression bound to the current button label text
limitTo<numberYes500Upper bound limit of options to show per group so that browser performance will not suffer with large data sets. Specify 0 or false to disable limiting.
name@stringNoUnique instance name used as the value of the button's id attribute
onChange&function(label)NoExpression called with label string when model changes
onToggleDropdown&function(isOpen)NoExpression called with isOpen boolean when dropdown opens or closes
selectAllText@stringYesSelect AllSelect all option label text
selectedSuffixSingularText@stringYesitemSingular suffix appended to button label text when option label properties are undefined
selectedSuffixText@stringYesitemsSuffix appended to button label text when option label properties are undefined
selectText@stringYesSelect...Default button label text when no options are selected

Development

npm i
npm start

Running Tests

npm test
1.3.6

4 years ago

1.3.5

6 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.6

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago