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
DataTable: rowClassName don't take prevalence over passthrough tailwind #5983
Comments
Its because of this line... className: classNames(rowClassName, cx('bodyRow', { rowProps: props })),
|
Can you try your https://stackblitz.com/edit/d8kwfr-srwond?file=src%2Fmain.jsx,src%2FApp.jsx Basically I am using pt={{
bodyRow: ({ context }) => ({
className: classNames('mt-2', {
'bg-primary': products[context.index].category === 'Fitness',
}),
}),
}} |
@Et7f3 were you able to try this? |
Yes It suits my needs. I am writing a PR so rowClassName can be merged. |
aweosme looking forward to it |
Describe the bug
The rowClassName attributes works and add the class
bg-primary
to row but the pt define some classbg-white
that are applied after our customization.We now have
bg-primary bg-white
The step 4 of https://primereact.org/tailwind/#unstyledmode doesn't help (my twMerge is never called)
Reproducer
https://stackblitz.com/edit/d8kwfr?file=src%2Fmain.jsx,src%2FApp.jsx
PrimeReact version
10.5.1
React version
18.x
Language
ALL
Build / Runtime
Vite
Browser(s)
ALL
Steps to reproduce the behavior
+import Tailwind from 'primereact/passthrough/tailwind';
Expected behavior
Class added with local customization should be visible instead of global classes.
My twMerge is used to resolve a conflict
I don't have to rewrite
bodyrow
to hide this bug. (this is my actual workaround)The text was updated successfully, but these errors were encountered: