UNPKG

comindware.core.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.

30 lines (25 loc) 678 B
import CanvasView from 'demoPage/views/CanvasView'; export default function() { const possibleItems = _.times(200, n => ({ id: n, text: `Text ${n}`, subtext: `subtext ${n}` })); const model = new Backbone.Model({ dropdownValue: ['120', '10', '3'] }); const view = new Core.form.editors.DatalistEditor({ model, key: 'dropdownValue', autocommit: true, collection: possibleItems, valueType: 'id', maxQuantitySelected: 4, allowEmptyValue: true }); return new CanvasView({ view, presentation: '{{dropdownValue}}', isEditor: true }); }