editor: set label to auto instead of true when using the toggle button
This commit is contained in:
parent
9e74387ede
commit
bafe7f75dc
2 changed files with 8 additions and 2 deletions
|
|
@ -78,7 +78,12 @@ module.exports = function editField(editor, widget, propName, defaultValue){
|
|||
`
|
||||
|
||||
toggle.addEventListener('click', ()=>{
|
||||
input.value = !widget.getProp(propName)
|
||||
if (propName === 'label' && !widget.getProp(propName) === true) {
|
||||
// special case
|
||||
input.value = 'auto'
|
||||
} else {
|
||||
input.value = !widget.getProp(propName)
|
||||
}
|
||||
DOM.dispatchEvent(input, 'change')
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue