primefaces / primereact

The Most Complete React UI Component Library
https://primereact.org
MIT License
6.68k stars 1.01k forks source link

Datatable multiple Selection autoFocus to check mark button when it's in edit mode #2634

Open Abdulelahx7 opened 2 years ago

Abdulelahx7 commented 2 years ago

There is no guarantee in receiving an immediate response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeReact PRO Support where support is provided within 4 business hours

I'm submitting a ... (check one with "x")

[ x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Current behavior In Datatable there is a selection with multiple selection mode there was problem earlier that it's auto focus to the checkbox it has been fix in issue #2575, but if i have clicked to edit row clicking any thing in the datatable will auto focus to the check mark button of the edit row.

also trying to fix it with onRowClick for example e.preventDefault, it is work but if the edit input is MultiSelect it does not fix it. In addition removing the selection fix the problem but the MultiSelect it still auto focus.

Note: i have tried selectionAutoFocus={false} and still same problem

Expected behavior when it's in the row edit mode and with the selection option enabled, clicking any row or when clicking to MultiSelect or Dropdown item should not auto focus to the check mark button.

Minimal reproduction of the problem with instructions The example is to add datatable with multiple selection mode and edit row mode when trying to edit click any row or by clicking to MultiSelect or Dropdown item it will auto focus to the check mark button.

Please tell us about your environment: Windows 10

sbrauch commented 2 years ago

I'm having the same issue and I put my information here and in discord if this helps: https://github.com/primefaces/primereact/issues/2575#issuecomment-1239095035 https://discord.com/channels/787967399105134612/787968635414118421/1017051888681767023

sbrauch commented 2 years ago

By the way, I kind of found a workaround by separating my code into three different tables each one with a specific edit mode. Not the best, but it seems to work.