primereact
primereact copied to clipboard
Fix: Datatable radiobuttons and types
Defect Fixes
Fix #6697
I fix the behavior of radiobuttons in datatable so they can be styled through PT, and although I don't even know what ptm, ptmo, cx, sx functions mean and do... I figured out what they did and managed to make it work. So please, if there is a cleaner way or a 'Prime React' way you usually use, feel free to make the necessary changes.
Changes made:
- Types: Fix wrong defined types
- Types: Add missing types
- Types: Remvove types not used
- Datatable: Propagate unstyled prop inside Datatable internal components
- Radiobutton: Change prop input to radiobuttoninput
- Radiobutton: Change prop box to radiobuttonbox
- Radiobutton: Change prop icon to radiobuttonicon
- Update Tailwind PT
- Update Datatable doc unstyled example
Using the same example used to reproduce the bug you can see the result:
- Download stackblitz example to local
- Clone PrimeReact with changes from this pull request
- Build PrimeReact in local
- Link PrimeReact local library in Stackblitz local example
- Serve
- You will see 2 Datatables
- Styles in "Fixed unstyled values" Datatable should be correct.
Table "Deafult unstyled values" not working:
Fixed table "Fixed unstyled values":
Example of PrimeReact documentation:
ONLY RADIOBUTTONS, DON'T COMPARE REST OF STYLES
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| primereact | ⬜️ Ignored (Inspect) | Visit Preview | Jun 10, 2024 11:02am | |
| primereact-v9 | ⬜️ Ignored (Inspect) | Visit Preview | Jun 10, 2024 11:02am |
See "npm run build:api" script in package.json
In fact I didn't manually change any the index.json, but after running npm run dev:link:windows and making the changes that file was auto generated. If index.json files are not needed when doing a commit maybe .gitignore should be updated...
Hmm OK i didn't see you had updated .d.ts that is what triggers the updating of index.json.
@nitrogenous this looks great to me but wanted you to review also.
Seems fine but we are currently working on some structural updates let me also check is there any conflicts with our current tasks. Appreciate it @melloware