UNPKG

comindware.ui

Version:

Comindware Core UI provides the basic components like editors, lists, dropdowns, popups that we so desperately need while creating Marionette-based single-page applications.

27 lines (24 loc) 813 B
define([ 'comindware/core', 'demoPage/views/EditorCanvasView' ], function (core, EditorCanvasView) { 'use strict'; return function () { var possibleItems = _.times(200, function (n) { return { id: n + 1, text: 'Text ' + (n + 1) }; }); var model = new Backbone.Model({ dropdownValue: 42 }); return new EditorCanvasView({ editor: new core.form.editors.DropdownEditor({ model: model, key: 'dropdownValue', autocommit: true, collection: new Backbone.Collection(possibleItems), enableSearch: true }), presentation: "{{dropdownValue}}" }); }; });