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!

7 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:

Hi @Paulo, any news related to this feature?

Hi @Almopt, no updates yet but I added your +1 internally. :slightly_smiling_face:

1 Like

Hit this myself today - would be a useful addition going forward :+1:

2 Likes

Hey @Paulo, stumbled across this quite often and it would be super helpful to have the same functionalities as the "single" button has. Any news related to it? :smiley:

1 Like

No news yet but that's great feedback! I added it to the request. :slightly_smiling_face: