diff --git a/docs/_includes/options-new/data/select.html b/docs/_includes/options-new/data/select.html index b1b89715..b915c921 100644 --- a/docs/_includes/options-new/data/select.html +++ b/docs/_includes/options-new/data/select.html @@ -24,10 +24,34 @@

- No. + No. This is a limitation of the HTML specification and is not a limitation that Select2 can overcome.

How are <option> and <optgroup> tags serialized into data objects?

+ +

+ Select2 will convert the <option> tag into a data object based on the following rules. +

+ +
+{
+  "id": "value attribute" || "option text",
+  "text": "label attribute" || "option text",
+  "element": HTMLOptionElement
+}
+
+ +

+ And <optgroup> tags will be converted into data objects using the following rules +

+ +
+{
+  "text": "label attribute",
+  "children": [ option data object, ... ],
+  "elment": HTMLOptGroupElement
+}
+
\ No newline at end of file