ovh / manager

OVHcloud Control Panel
https://ovh.github.io/manager/
BSD 3-Clause "New" or "Revised" License
215 stars 98 forks source link

[manager-components]: Add loading state to Datagrid #13302

Open tristanwagner opened 1 month ago

tristanwagner commented 1 month ago

Have you already checked if a similar item is present on manager-react-components?

What do you expect from this request?

Component

Description

It would be nice to be able to set a loading state (boolean) to the Datagrid component, if loading prop is true then display a spinner instead of the rows or add a row withSkeleton components that reflect the shape of the columns, or put a slot that will be dislayed in the grid if loading prop is true.

Where do you expect to use this?

any project that use Datagrid

Do you have mock-up?

can produce if needed

When do you expect this to be delivered?

any

Additional Information

No response

aboungnaseng-ovhcloud commented 1 month ago

In ods version 18, we will have a state isLoading inside the ods-button

we can trigger this attribute to manage the isLoading state.

But if you are using the current version, you can hide the 'load more' button with the attribute 'hasNextPage', when the status 'isLoading' at true, you can hide the button. And if you want you can display a little spinner in your react app at the bottom of the datagid