microsoft / powercat-creator-kit

This toolkit helps create well-designed Power App experiences on the web & mobile. It contains a component library; PCF controls and other utilities that increase developer productivity.
MIT License
307 stars 51 forks source link

Issue using ItemDivider on CommandBar #435

Closed danielvi1787 closed 1 week ago

danielvi1787 commented 1 year ago

Hi,

I'm trying to add a divider between two commands on the command bar but it renders to blank. According to documentation:

ItemHeader and ItemDivider must be set to true to render as a divider. If set to false, it expects other values and will render blank.

This is my Items property:

Table( { ItemKey: "back", ItemIconOnly: true, ItemIconName: "Back" }, { ItemHeader: true, ItemDivider: true }, { ItemKey: "save", ItemDisplayName: "Save", ItemIconName: "Save" }, { ItemKey: "saveandclose", ItemDisplayName: "Save & Close", ItemIconName: "SaveAndClose" } )

What am I missing?

Thanks. Daniel

denise-msft commented 9 months ago

@danielvi1787 ItemDivider only appears in the dropdown/menu when there are child items of the root nodes. So you need to have some of the items including the divider to show as children (pointing to a parent with ItemParentKey). Sorry if this was not clear in docs and we'll update accordingly.