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

Fix: Datatable radiobuttons and types #6698

Merged
merged 12 commits into from
Jul 3, 2024

Conversation

ivanpajon
Copy link
Contributor

@ivanpajon ivanpajon commented May 28, 2024

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:

  1. Download stackblitz example to local
  2. Clone PrimeReact with changes from this pull request
  3. Build PrimeReact in local
  4. Link PrimeReact local library in Stackblitz local example
  5. Serve
  6. You will see 2 Datatables
  7. Styles in "Fixed unstyled values" Datatable should be correct.

Open in StackBlitz

Table "Deafult unstyled values" not working:
default_unstyled_values

Fixed table "Fixed unstyled values":
fixed_unstyled_values

Example of PrimeReact documentation:
radiobutton_primereact_doc

ONLY RADIOBUTTONS, DON'T COMPARE REST OF STYLES

Copy link

vercel bot commented May 28, 2024

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

Copy link
Member

@melloware melloware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to update index.json you should update the .d.ts file and it gets autogenerated from the TypeScript files.

@melloware
Copy link
Member

See "npm run build:api" script in package.json

@ivanpajon
Copy link
Contributor Author

ivanpajon commented May 29, 2024

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...

@melloware
Copy link
Member

Hmm OK i didn't see you had updated .d.ts that is what triggers the updating of index.json.

@melloware melloware added the Status: Pending Review Issue or pull request is being reviewed by Core Team label May 29, 2024
@melloware
Copy link
Member

@nitrogenous this looks great to me but wanted you to review also.

@nitrogenous
Copy link
Contributor

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

@nitrogenous nitrogenous requested a review from gucal May 30, 2024 08:32
@nitrogenous nitrogenous merged commit 0523b90 into primefaces:master Jul 3, 2024
5 checks passed
@ivanpajon ivanpajon deleted the fix/datatable-radiobutton branch July 3, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Datatable: Unstyled mode doesn't work with radiobutton
3 participants