Comments (17)
Nevermind see you did!
from primereact.
@kl-nevermore can you read this ticket please since the change in question was your recent change?
from primereact.
@didix16
I removed useEffect and manually sync editingRowDataStateRef
according to the original plan
and removed event.preventDefault() in onCellEditComplete
The gif should be the expected behavior, right?
from primereact.
merged!
from primereact.
I've tried to rollback before #6641 modification and seems to work fine. So it's related on how switchCellToViewMode handles now the changes and maybe the useEffect for refresh the cache row state.
from primereact.
After doing some tests, I've found something. It seems that now event.preventDefault() MUST NOT be called inside onCellEditComplete. After removing this, with the current 10.6.6 version, the tabulation works ALMOST as expected. The only problem I found is that Shift + TAB can't change from first cell table to any other focusable element.
@melloware I think the documentation examples should be updated, removing the event.preventDefault() on onCellEditComplete examples.
Also I'm gonna make a PR fixing the editorCallback to properly update the value.
So finally it remains that strange bug that Shift + TAB can't change from first cell table to any other focusable element
from primereact.
Agreed. Did you want to submit a PR?
from primereact.
If you want to fix both issues in your PR I will review.
from primereact.
I would like to fix also the bug when you press Shift + TAB on first cell but at the moment I don't how to fix it without rolling back the old code. I just only found a solution for what I mentioned before. Hope someone could help
from primereact.
I think it should be the order of execution timing of useEffect and callback.
from primereact.
@didix16
I removed useEffect and manually sync editingRowDataStateRef according to the original plan
and removed event.preventDefault() in onCellEditComplete
The gif should be the expected behavior, right?
@kl-nevermore yeah that should be the expected behavior indeed. By the way, what about returning from 1rst cell to another component, using shift + TAB?
from primereact.
@didix16 @melloware
I'm not sure which one is correct
changed
10.6.5
from primereact.
Mmm maybe the changed version has more sense in terms of accessibility. It allows to focus on column headers and interact with them.
from primereact.
I would assume it accessibility related to navigate to headers.
from primereact.
@melloware
Do you know why setTimeout is used here?
const focusOnElement = () => {
clearTimeout(tabindexTimeout.current);
tabindexTimeout.current = setTimeout(() => {
if (editingState) {
const focusableEl = props.editMode === 'cell' ? DomHandler.getFirstFocusableElement(elementRef.current, ':not([data-pc-section="editorkeyhelperlabel"])') : DomHandler.findSingle(elementRef.current, '[data-p-row-editor-save="true"]');
focusableEl && focusableEl.focus();
}
keyHelperRef.current && (keyHelperRef.current.tabIndex = editingState ? -1 : 0);
}, 1);
};
from primereact.
@didix16
submitted a PR, can you test it?
I tested it and looks ok
from primereact.
Hey @kl-nevermore. I've tested it and yeah seems that works as expected.
from primereact.
Related Issues (20)
- Dialog: autofocus button does not get focus HOT 2
- Tree: Unstyled mode is broken
- AutoComplete: VirtualScroller Panel Height HOT 2
- Upgrade from 8.x.x to 10.5.1 inputswitch component became a checkbox HOT 1
- React 19 Support HOT 12
- InputNumber: Cannot Type Zero as an Input HOT 4
- Datatable: Paginator not work HOT 2
- InputOTP: input does not work ok Android devices HOT 1
- Picklist: Automatic scroll to the top of the list when focus in HOT 1
- Dropdown: { value: 0 } doesn't work properly HOT 2
- DataTable: Wrong value briefly flashes when using sortable Columns in combination with editMode HOT 1
- DataTable: editor is still activated on cell click when editMode is off HOT 1
- Month skipped in dropdown when last day of month is greater than last day of next month HOT 2
- Datatable Cell edit manipulates data (not pure)
- Menubar: No access for content using pt props. HOT 1
- Data Not Rendered in PrimeReact editor component HOT 2
- ListBox: focusable using keyboard only once HOT 1
- TreeTable: Screenreader cannot read rows as expected
- Calendar: Add Clear "X" button to input field HOT 5
- Calendar: crash when using props "viewDate" and "onSelect" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from primereact.