Merge pull request #15452 from pajaroblanco/master

Select2 maximumSelectionSize to maximumSelectionLength
This commit is contained in:
Nathan Shively-Sanders
2017-03-28 15:06:17 -07:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ interface Select2Options {
minimumInputLength?: number;
maximumInputLength?: number;
minimumResultsForSearch?: number;
maximumSelectionSize?: number;
maximumSelectionLength?: number;
placeholder?: string | IdTextPair;
separator?: string;
allowClear?: boolean;
@@ -211,4 +211,4 @@ declare class Select2 {
$selection: JQuery;
$results: JQuery;
options: {options: Select2Options};
}
}

View File

@@ -32,7 +32,7 @@ $("#e5").select2({
}
});
$("#e19").select2({ maximumSelectionSize: 3 });
$("#e19").select2({ maximumSelectionLength: 3 });
$("#e10").select2({
data: [{ id: 0, text: 'enhancement' }, { id: 1, text: 'bug' }, { id: 2, text: 'duplicate' }, { id: 3, text: 'invalid' }, { id: 4, text: 'wontfix' }]
});