From 3783354d020d0f39d94ec2361cb7d0fb1b8d78e0 Mon Sep 17 00:00:00 2001
From: Kevin Brown
Date: Tue, 8 Mar 2016 20:04:57 -0500
Subject: [PATCH] Add documentation on ids needing to be strings
This closes https://github.com/select2/select2/issues/4052
This closes https://github.com/select2/select2/pull/4076
This closes https://github.com/select2/select2/issues/4227
---
docs/_includes/options/data/array.html | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/docs/_includes/options/data/array.html b/docs/_includes/options/data/array.html
index 0251ec1c..751635e8 100644
--- a/docs/_includes/options/data/array.html
+++ b/docs/_includes/options/data/array.html
@@ -33,6 +33,26 @@ $('select').select2({
included on the data objects that Select2 exposes.
+
+ Do the id
properties have to be strings?
+
+
+
+ Because the value
attributes on a >select<
+ tag must be strings, the id
property on the data objects must
+ also be strings. Select2 will attempt to convert anything that is not a
+ string to a string, which will work for most situations, but it is
+ recommended to force all of your ids to strings ahead of time.
+
+
+
+ I can't select results with blank ids or an id of 0
!
+
+
+
+ See Do the id
properties have to be strings?.
+
+
How should nested results be formatted?