From 96bc6ab38c37d21c3f3ded4634c671a82bca44c0 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Wed, 11 Apr 2012 12:05:35 -0700 Subject: [PATCH] catch up to master --- index.html | 31 +++++++++++++++++++++++++++++++ select2-master | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 556c2f4f..c98c57ce 100755 --- a/index.html +++ b/index.html @@ -323,8 +323,10 @@ $("#e10_3").select2({
  • Array Data
  • Remote/AJAX Data
  • Infinite Scrolling of Remote/AJAX data
  • +
  • Tagging Support
  • Pragmatic control
  • Events: Change
  • +
  • Events: Reacting to External Changes
  • Documentation
  • @@ -603,6 +605,35 @@ $("#e12").select2({tags:["red", "green", "blue"]}); +
    + +
    +

    Reacting to external value changes

    + +

    Select2 can react to external value changes and keep its selection in-sync. This feature allows + Select2 to work seamlessly with front-end frameworks that use data binding between ui components + and model values.

    +


    +

    +

    This feature is only available when initSelection() function is provided in + the options. This function is needed to map the choice ids set on the element to objects used by + Select2. This function is set by default when Select2 is attached to a select or when + the tags helper function is used.

    +
    +
    +

    Example Code

    +
    +           
    +
    +
    + + diff --git a/select2-master b/select2-master index a16190c8..54033cdb 160000 --- a/select2-master +++ b/select2-master @@ -1 +1 @@ -Subproject commit a16190c822e537a1fa95edb9a439d64bf9599b13 +Subproject commit 54033cdb0422ef7cc5c35ff5e94e3034a0539df5