Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to add custom classes to the popover root component #7072

Open
1 task done
sage-syfre opened this issue Nov 13, 2024 · 1 comment
Open
1 task done

Comments

@sage-syfre
Copy link

Description

When Carbon components with a popover (like DateInput,DateRange,Select...) are used in an AgGrid column filter they are displayed inside an AGGrid popup

When the use interacts with the Carbon component by clicking in the popover, AGGrid closes its popup because it recognizes the click as an "outside" click event.

To manage that AGGrid provides a custom class "ag-custom-component-popup" that the user can add to its own popup root element.

With the DateInput component it's possible to add this class to the DayPicker using the pickerProps, but unfortunatly the pickerProps are not passed to the DayPicker in DateRange component. (bug?)

With the Select component there is no simple way to add this class.

Suggested solution

A quick and dirty way is to add the "ag-custom-component-popup" to the popover root element

Demo URL

No response

Alternatives

No response

Additional context

No response

Confidentiality

  • I confirm there is no confidential or commercially sensitive information included.
@sage-syfre sage-syfre added Enhancement triage Triage Required labels Nov 13, 2024
@Parsium
Copy link
Contributor

Parsium commented Nov 19, 2024

Hi @sage-syfre 👋🏼 Would you be able to reproduce a small example using our starter template please?

We are hesitant about reintroducing className as a prop for our components, as it could lead to consumers overriding our CSS styles. This was a major challenge in the past and introduced maintenance difficulties.

That said, if this is a major blocker, we can explore alternative solutions to fix the underlying issue.

@Parsium Parsium added More Information Required and removed triage Triage Required labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants