File tree Expand file tree Collapse file tree
docs/_includes/options-new/data Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 </ h3 >
2525
2626 < p >
27- No.
27+ No. This is a limitation of the HTML specification and is not a limitation that Select2 can overcome.
2828 </ p >
2929
3030 < h3 >
3131 How are < code > <option></ code > and < code > <optgroup></ code > tags serialized into data objects?
3232 </ h3 >
33+
34+ < p >
35+ Select2 will convert the < code > <option></ code > tag into a data object based on the following rules.
36+ </ p >
37+
38+ < pre class ="prettyprint linenums ">
39+ {
40+ "id": "value attribute" || "option text",
41+ "text": "label attribute" || "option text",
42+ "element": HTMLOptionElement
43+ }
44+ </ pre >
45+
46+ < p >
47+ And < code > <optgroup></ code > tags will be converted into data objects using the following rules
48+ </ p >
49+
50+ < pre class ="prettyprint linenums ">
51+ {
52+ "text": "label attribute",
53+ "children": [ option data object, ... ],
54+ "elment": HTMLOptGroupElement
55+ }
56+ </ pre >
3357</ section >
You can’t perform that action at this time.
0 commit comments