ovh / manager

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

[manager-components]: <Datagrid> #13794

Open seven-amid opened 3 weeks ago

seven-amid commented 3 weeks ago

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

What do you expect from this request?

Component

Description

We have a use case in load balancer to display a popover on the data grid title. Currently, the title is typed as a string, but we need it to accept a JSX element as well to support this functionality. Could you please update it accordingly? Here is an example of wanted behaviour image

Where do you expect to use this?

load-balancer

Do you have mock-up?

No response

When do you expect this to be delivered?

No response

Additional Information

No response

anooparveti commented 17 hours ago

Instead of accepting the JSX element as input. We will make a change to accept tooltip and display it.

<Datagrid
       columns={[{ id: 'abc', cell: <span>Test</span>, label: 'test', tooltip: t('tooltip_content')}]}
       ...
/>

This helps in maintaining more uniformity with displaying label, sort option and tooltip across the apps.