Altinn / app-frontend-react

Altinn application React frontend
BSD 3-Clause "New" or "Revised" License
18 stars 31 forks source link

Should be able to render CustomComponent in ButtonGroup #1256

Closed lasseklovstad closed 1 year ago

lasseklovstad commented 1 year ago

Description of the bug

Hey we have made a button as a custom web component and we would like to use it with ButtonGroup to align them horisontaly. But this is not possible. Is there areason why this is not possible today?

Steps To Reproduce

  1. Add a custom web component to a ButtonGroup
  2. Doesn't work

Additional Information

I think an easy fix is to add:

canRenderInButtonGroup(): boolean {
    return true;
  }

to custom component class

olemartinorg commented 1 year ago

@lasseklovstad Do you have a chance to test this now? It'll soon be released, but you can also test it in the main branch.

lasseklovstad commented 1 year ago

@olemartinorg Yes we will tests it as soon we have time. It is in our summer sprint board :)

ZuperNova commented 1 year ago

@olemartinorg I just updated our app to utilize the new feature for ButtonGroup and I can confirm that this works 🎉