diff --git a/docs/integration.md b/docs/integration.md index 918b6c08..36950227 100644 --- a/docs/integration.md +++ b/docs/integration.md @@ -7,110 +7,102 @@ It's recommended that you encapsulate integration code in a component or a helpe The example below shows a simple component that integrates with the [select2 library](http://ivaynberg.github.io/select2/). ```javascript -var Select2 = { - // Returns a select box - view: function(ctrl, attrs) { - var selectedId = attrs.value().id; - //Create a Select2 progrssively enhanced SELECT element - return m("select", {config: Select2.config(attrs)}, [ - attrs.data.map(function(item) { - var args = {value: item.id}; - // Set selected option - if(item.id == selectedId) { - args.selected = "selected"; - } - return m("option", args, item.name); - }) - ]); - }, - /** - Select2 config factory. The params in this doc refer to properties of the `ctrl` argument - @param {Object} data - the data with which to populate the