Skip to content

Commit 5895110

Browse files
Update docs.md (#6162)
1 parent 3ce9736 commit 5895110

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • docs/pages/15.upgrading/02.migrating-from-35

‎docs/pages/15.upgrading/02.migrating-from-35/docs.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ $.fn.select2.amd.require([
165165
$("#select").select2({
166166
dataAdapter: CustomData
167167
});
168-
}
168+
});
169169
```
170170

171171
The new `current` method of the data adapter works in a similar way to the old `initSelection` method, with three notable differences. The first, and most important, is that **it is called whenever the current selections are needed** to ensure that Select2 is always displaying the most accurate and up to date data. No matter what type of element Select2 is attached to, whether it supports a single or multiple selections, the data passed to the callback **must be an array, even if it contains one selection**.

0 commit comments

Comments
 (0)