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.
28 lines (23 loc) • 719 B
JavaScript
import CanvasView from 'demoPage/views/CanvasView';
export default function () {
const model = new Backbone.Model({
numberValue: 42
});
return new CanvasView({
view: new Core.form.editors.NumberEditor({
model,
key: 'numberValue',
changeMode: 'keydown', //default - 'blur', like browser behavior
autocommit: true,
min: 10000,
max: 300000,
step: 3,
allowFloat: true,
intlOptions: { //options for new Intl.NumberFormat([locales[, options]])
minimumFractionDigits: 2
}
}),
presentation: '{{numberValue}}',
isEditor: true
});
}