Bug: Only one Split Button allowed

Bug: Only one Split Button allowed

rf1234rf1234 Posts: 2,523Questions: 79Answers: 368
edited April 2022 in Buttons

In case you have more than one split button the dropdown will always display underneath the first of them.

I checked the code: All divs with a split button ("splitDiv") are assigned the same class...

var splitDiv;
if(isSplit) {
        splitDiv = $('<div/>').addClass(this.c.dom.splitWrapper.className)
        splitDiv.append(button);
        var dropButtonConfig = $.extend(config, {
                text: this.c.dom.splitDropdown.text,
                className: this.c.dom.splitDropdown.className,
                closeButton: false,
                attr: {
                        'aria-haspopup': true,
                        'aria-expanded': false
                },
                align: this.c.dom.splitDropdown.align,
                splitAlignClass: this.c.dom.splitDropdown.splitAlignClass

        })

And then the first splitDiv is the node ... That cannot work because the button name is not part of the class name.

return {
    conf:         config,
    node:         isSplit ? splitDiv.get(0) : button.get(0),
    inserter:     isSplit ? splitDiv : inserter,
    buttons:      [],
    inCollection: inCollection,
    isSplit:      isSplit,
    inSplit:      inSplit,
    collection:   null
};

Replies

  • allanallan Posts: 57,699Questions: 1Answers: 9,195 Site admin

    Hi Roland,

    Thanks! Sandy will take a look at this when he is back in on Thursday.

    Allan

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @rf1234 ,

    Something isn't right there. I've raised an issue internally (DD-2529 for my reference) and will report back here when there is an update.

    Thanks,
    Sandy

  • rf1234rf1234 Posts: 2,523Questions: 79Answers: 368

    Hi Sandy,

    any news?

    Roland

  • allanallan Posts: 57,699Questions: 1Answers: 9,195 Site admin

    Hi Roland,

    Fix committed here. Apologies for the delay - Sandy has actually gone now - he's finished his undergrad degree and moved on to a full time position with another company.

    Allan

  • rf1234rf1234 Posts: 2,523Questions: 79Answers: 368

    Thanks Allan!

Sign In or Register to comment.