We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SplitButton menu not appearing in subcomponent

When placing a splitbutton on a page directly from a component - say, splitbutton "A" - it works as documented.

When calling a secondary component to apply some logic to the data and then show a splitbutton ("B"), it responds to event handlers correctly but won't show the items in the menu. A small rectangle appears below the main widget but with nothing in it. Looking in Chrome Dev Tools "Inspect", there' ul and /ul

and nothing inbetween.

I've confirmed the [items] input syntax is exactly alike in both of them and that the ItemModel data is populated correctly (I can iterate it on the page in each case).

A and B both look like this:


<ejs-splitbutton #sfSplitbuttonMenu

            [disabled]="!userAuthorized"

            [content]="textForDefaultChoice"

            [items]='sbItemsList'

            cssClass="splitbuttonStyle"

            (click)="splitbuttonMainItemClicked($event)"

            (select)="splitbuttonItemSelected($event)">

        </ejs-splitbutton>


Maybe there's something about the subcomponent situation that prevents it from working right? Or maybe I've missed something else.


1 Reply

SH Stephen Hurst May 4, 2023 03:56 PM UTC

Hi, It turned out that this was not a SyncFusion issue, it was due to timing in the parent component.  So for anyone looking here, just make sure data is ready before the SF widget is expected to use it.


Loader.
Up arrow icon