Fix custom checkbox creation
[MAILPOET-2796]
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import Icon from '../custom_text/icon.jsx';
|
import Icon from '../custom_text/icon.jsx';
|
||||||
import Edit from './edit.jsx';
|
import Edit from './edit.jsx';
|
||||||
|
import { customFieldValuesToBlockValues } from '../../store/form_body_to_blocks.jsx';
|
||||||
|
|
||||||
export const name = 'mailpoet-form/custom-checkbox';
|
export const name = 'mailpoet-form/custom-checkbox';
|
||||||
|
|
||||||
@@ -20,7 +21,8 @@ export function getSettings(customField) {
|
|||||||
},
|
},
|
||||||
values: {
|
values: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
default: [],
|
default: customField.params.values
|
||||||
|
? customFieldValuesToBlockValues(customField.params.values) : [],
|
||||||
},
|
},
|
||||||
mandatory: {
|
mandatory: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
|
Reference in New Issue
Block a user