1
0
mirror of synced 2024-11-23 13:36:01 +03:00
select2/docs/_includes/options-new/data/array.html
Kevin Brown 75abd407c8 Continue building out the FAQ
This adds more questions that will eventually get answers. Most of these
questions are already answered either in the current documentation or on
Stack Overflow, so it shouldn't be too difficult to fill out answers for
them.
2015-08-31 20:43:01 -04:00

37 lines
849 B
HTML

<section>
<h2 id="data">
Can I load data into Select2 using an array?
</h2>
<p>
Yes, but only when you are initially creating it.
</p>
<h3>
What properties are required on the objects passed in to the array?
</h3>
<h3>
How should nested results be formatted?
</h3>
<h3>
How many levels of nesting are allowed?
</h3>
<h3>
Why are <code>&lt;option&gt;</code> tags being created?
</h3>
<p>
The <code>data</code> option is a shortcut that Select2 provides which allows you to load options into your <code>select</code> from a data array.
</p>
<h3>
My objects don&apos;t use <code>id</code> for their unique identifiers, what can I do?
</h3>
<h3>
My objects use a property other than <code>text</code> for the text that needs to be displayed
</h3>
</section>