jsdialog: don't ignore menubutton with empty text

build also empty menubuttons, example:
- writer -> review -> manage -> filter
- select 'Date' checkbox
result: end date disappears
expected: menubutton should be recreated with empty string

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I96ba161d209a4f65bd40b4a1efac896e3e172d0c
This commit is contained in:
Szymon Kłos 2023-07-07 17:07:39 +02:00 committed by Szymon Kłos
parent ee3935a997
commit 9720311bcd

View file

@ -68,7 +68,7 @@ function _menubuttonControl (parentContainer, data, builder) {
});
builder.options.noLabelsForUnoButtons = noLabels;
} else if (data.text || data.image) {
} else if (data.text !== undefined || data.image) {
var button = L.DomUtil.create('button', 'menubutton ' + builder.options.cssClass, parentContainer);
button.id = data.id;
button.setAttribute('aria-haspopup', true);