array.html 849 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <section>
  2. <h2 id="data">
  3. Can I load data into Select2 using an array?
  4. </h2>
  5. <p>
  6. Yes, but only when you are initially creating it.
  7. </p>
  8. <h3>
  9. What properties are required on the objects passed in to the array?
  10. </h3>
  11. <h3>
  12. How should nested results be formatted?
  13. </h3>
  14. <h3>
  15. How many levels of nesting are allowed?
  16. </h3>
  17. <h3>
  18. Why are <code>&lt;option&gt;</code> tags being created?
  19. </h3>
  20. <p>
  21. 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.
  22. </p>
  23. <h3>
  24. My objects don&apos;t use <code>id</code> for their unique identifiers, what can I do?
  25. </h3>
  26. <h3>
  27. My objects use a property other than <code>text</code> for the text that needs to be displayed
  28. </h3>
  29. </section>