From e6f2a743f4ef7e3e3290392c066af195e27cf629 Mon Sep 17 00:00:00 2001 From: Brandon Ayers Date: Tue, 28 Mar 2017 10:48:56 -0700 Subject: [PATCH 1/2] Select2 maximumSelectionSize to maximumSelectionLength Renamed Select2 option maximumSelectionSize to maximumSelectionLength to match Select2 source: https://github.com/select2/select2/blob/062c6c3af5f0f39794c34c0a343a3857e587cc97/src/js/select2/data/maximumSelectionLength.js#L5 --- types/select2/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/select2/index.d.ts b/types/select2/index.d.ts index 719e6673f8..f3492b6bb1 100644 --- a/types/select2/index.d.ts +++ b/types/select2/index.d.ts @@ -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}; -} \ No newline at end of file +} From 4bc97ff776c5ac638a7cabe8ef4c13724b039ee3 Mon Sep 17 00:00:00 2001 From: Brandon Ayers Date: Tue, 28 Mar 2017 11:26:32 -0700 Subject: [PATCH 2/2] Update select2-tests.ts with corrected property Updated select2-tests.ts to reflect updated Select2Options property `maximumSelectionLength`. --- types/select2/select2-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/select2/select2-tests.ts b/types/select2/select2-tests.ts index c10b482cab..5d794e64e0 100644 --- a/types/select2/select2-tests.ts +++ b/types/select2/select2-tests.ts @@ -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' }] });