Closed meizibupt closed 1 year ago
@meizibupt I'm going to look at this a little more later tonight, but when I pulled it down and used it. The main issue I'm seeing is that Nav to Edit mode and try to set focus on the disabled item. To reproduce, navigate with the arrow keys and then press enter. Focus visually disappears/gets lost.
I would recommend disabling switching to edit mode, essentially ignoring the switch to edit mode
Demo:
@meizibupt I'm going to look at this a little more later tonight, but when I pulled it down and used it. The main issue I'm seeing is that Nav to Edit mode and try to set focus on the disabled item. To reproduce, navigate with the arrow keys and then press enter. Focus visually disappears/gets lost.
I would recommend disabling switching to edit mode, essentially ignoring the switch to edit mode
thanks for reviewing. can you be more specific. what do you mean by disabling edit mode? do you mean disallowing navigating to the disabled checkbox?
Yes, as in ignore the enter key if the child is disabled which is what is done when the content is only text in a cell.
Please check me on this, but I believe returning a normal disabled <Checkbox>
instead of <InteractiveCheckbox>
here https://github.com/salesforce/design-system-react/blob/master/components/data-table/private/row.jsx#L145
would disable the focus and treat it as non-actionable / non-editable.
Same with Radio
here https://github.com/salesforce/design-system-react/blob/master/components/data-table/private/row.jsx#L145
Great addition! @meizibupt
Fixes #3125
Additional description
add option to disable radio/checkbox for datatable
CONTRIBUTOR checklist (do not remove)
Please complete for every pull request
npm run lint:fix
has been run and linting passes.components/component-docs.json
CI tests pass (npm test
).REVIEWER checklist (do not remove)
components/component-docs.json
tests.Required only if there are markup / UX changes
last-slds-markup-review
inpackage.json
and push.last-accessibility-review
, topackage.json
and push.npm run local-update
within locally cloned site repo to confirm the site will function correctly at the next release.