-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Hi!
Here is my schema:
// The schema for the editor
schema: {
type: "array",
title: "Список",
format: "table",
items: {
title: "Ингредиент",
headerTemplate: "{{i}} - {{self.title_ru}}",
properties: {
product: {
title: 'Продукт',
type: 'string',
format: 'select2-products'
},
value: {
title: 'Значение',
type: 'number'
},
measure: {
title: 'Мера',
type: 'string',
enum: ['gr','tablespoon', 'teaspoon', 'glass', 'piece'],
options: {
enum_titles: ['грамм','Столовая ложка','Чайная ложка','Стакан','Штука']
}
},
optional: {
title: 'По вкусу?',
type: 'boolean',
format: 'checkbox'
}
}
}
},
If last propertie ("optional") having format = 'checkbox' then I have this error in Console.
Uncaught TypeError: Cannot read property 'insertBefore' of undefined
It's on line 6286
if(input.type === 'checkbox' && label) {
label.insertBefore(input,label.firstChild);
}
Possible fix:
if(input.type === 'checkbox' && label) {
label.insertBefore(input,label.firstChild);
}
Thanks.
Metadata
Metadata
Assignees
Labels
No labels