Giter Club home page Giter Club logo

Comments (17)

melloware avatar melloware commented on September 7, 2024 1

Nevermind see you did!

from primereact.

melloware avatar melloware commented on September 7, 2024 1

@kl-nevermore can you read this ticket please since the change in question was your recent change?

from primereact.

kl-nevermore avatar kl-nevermore commented on September 7, 2024 1

@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?
20240529105717_rec_

from primereact.

melloware avatar melloware commented on September 7, 2024 1

merged!

from primereact.

didix16 avatar didix16 commented on September 7, 2024

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.

didix16 avatar didix16 commented on September 7, 2024

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.

melloware avatar melloware commented on September 7, 2024

Agreed. Did you want to submit a PR?

from primereact.

melloware avatar melloware commented on September 7, 2024

If you want to fix both issues in your PR I will review.

from primereact.

didix16 avatar didix16 commented on September 7, 2024

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.

kl-nevermore avatar kl-nevermore commented on September 7, 2024

I think it should be the order of execution timing of useEffect and callback.

from primereact.

didix16 avatar didix16 commented on September 7, 2024

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

kl-nevermore avatar kl-nevermore commented on September 7, 2024

@didix16 @melloware
I'm not sure which one is correct

changed

20240530101448_rec_

10.6.5

20240530101714_rec_

from primereact.

didix16 avatar didix16 commented on September 7, 2024

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.

melloware avatar melloware commented on September 7, 2024

I would assume it accessibility related to navigate to headers.

from primereact.

kl-nevermore avatar kl-nevermore commented on September 7, 2024

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

kl-nevermore avatar kl-nevermore commented on September 7, 2024

@didix16
submitted a PR, can you test it?
I tested it and looks ok

from primereact.

didix16 avatar didix16 commented on September 7, 2024

Hey @kl-nevermore. I've tested it and yeah seems that works as expected.

from primereact.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.