1
0
mirror of synced 2024-11-23 13:36:01 +03:00
select2/docs/_includes/options-new/data/array.html

37 lines
849 B
HTML
Raw Normal View History

<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>