Loading state for Button Groups

Hi there!

We really like the revamped button group component – good job!
One thing that is missing is the ability to set a loading state similar to the normal button component. Especially with queries that take longer to run, it's difficult to visualise to user that their button click actually had an effect and the query is running.

It would be amazing if this could be implemented!

5 Likes

Hi @nikita_from_bunch, we could achieve this functionality by adding a ternary to the button's label.

For example, given the following "Button Group" component:


We can add an event handler to the first button (blue) to run a query. Then, update its label to show "Loading..." while the query's "isFetching" property evaluates to true.

Here are the settings for the above:

Here is the result:

Hi Paulo!

While this is a workaround, it doesn't support other features such as "hoist loading state" on containers etc..

Is there any update on the implementation of an actual loading state for Button groups?

4 Likes

No updates yet. We'll update you here with any news from our devs. I went ahead and added the +5. :slightly_smiling_face: