Skip to content

Commit

Permalink
Merge pull request #1571 from GogoVega/fix-ui-spacer-layout
Browse files Browse the repository at this point in the history
Layout does not edit the `ui-spacer` node with `editConfig`
  • Loading branch information
joepavitt authored Jan 10, 2025
2 parents a4ef6a5 + 6433973 commit 5dc8466
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nodes/config/ui_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -1176,9 +1176,9 @@
* @param {Object} list - The editableList instance associated with this item
*/
function addRowActions (parent, item, list) {
const configNodes = ['ui-base', 'ui-page', 'ui-link', 'ui-group', 'ui-theme']
const configNodes = ['ui-base', 'ui-page', 'ui-link', 'ui-group', 'ui-theme', 'ui-spacer']
const btnGroup = $('<div>', { class: 'nrdb2-sb-list-header-button-group', id: item.id }).appendTo(parent)
if (!configNodes.includes(item.type) && item.type !== 'ui-spacer') {
if (!configNodes.includes(item.type)) {
const focusButton = $(`<a href="#" class="nr-db-sb-tab-focus-button editor-button editor-button-small nr-db-sb-list-header-button" title="${c_('layout.focus')}"><i class="fa fa-bullseye"></i></a>`).appendTo(btnGroup)
focusButton.on('click', function (evt) {
RED.view.reveal(item.id)
Expand Down Expand Up @@ -1236,7 +1236,7 @@
evt.preventDefault()
const widget = toDashboardItem(spacerNode)
list.editableList('addItem', widget)
RED.editor.edit(widget.node)
RED.editor.editConfig('', spacerNode.type, spacerNode.id)
})
.appendTo(btnGroup)
}
Expand Down

0 comments on commit 5dc8466

Please sign in to comment.