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

Keyboard navigation Table - Edit with arrows #6982

Closed
DanRic opened this issue Dec 11, 2018 · 16 comments
Closed

Keyboard navigation Table - Edit with arrows #6982

DanRic opened this issue Dec 11, 2018 · 16 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@DanRic
Copy link

DanRic commented Dec 11, 2018

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

[ ] bug report => Search github for a similar issue or PR before submitting
[x] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior

No navigation between editable cells of the turbo-table in Edit mode with arrows (right, left, up and down) like is with tab key.

Expected behavior

Possibility to navigate between the editable cells of different records with the arrows.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Angular version: 7.0
  • PrimeNG version: 7.0
  • Browser: [Chrome Last | IE 11 ]
  • Language: [all | TypeScript X.X | ES6]
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Feb 17, 2020
@mertsincan mertsincan added this to the 11.0.1 milestone Nov 19, 2020
@yigitfindikli yigitfindikli self-assigned this Dec 3, 2020
@yigitfindikli yigitfindikli modified the milestones: 11.0.0-Final, 11.0.1 Dec 7, 2020
@yigitfindikli yigitfindikli modified the milestones: 11.1.0, 11.2.0 Jan 11, 2021
@Tr1monster
Copy link

Tr1monster commented Jan 14, 2021

This will be an awsome feature. We realy need this feature for our business case. @yigitfindikli are there any suggestions on the release date of this feature?

@yigitfindikli
Copy link
Contributor

Done @Tr1monster 🏴‍☠️

@ThoSap
Copy link
Contributor

ThoSap commented Jan 25, 2021

This enhancement accidentally broke the usage of the arrow keys to de- and increase an input number in a pEditableColumn .

@lf-novelt
Copy link

lf-novelt commented Mar 25, 2021

also it broke the native input text behavior that, when typing some text, you expect the left arrow to go to the previous character, not to change column.
Is there a way to disable this behavior, at least for the left / right arrows for single line input? or to only change cell if right arrow pressed and cursor is at the last character of the current input?

@lf-novelt
Copy link

lf-novelt commented Jun 7, 2021

can anyone reopen this issue in order to fix the broken behavior it introduced or put it behind a config @yigitfindikli?

@jsanz1209
Copy link

I'm getting the same thing as @If-novelt

I would like to know too if is there any way for disabled that behaviour, I mean, what I be able navigate between input's characters without changing of column.

Thanks in advance.

@Tr1monster
Copy link

Tr1monster commented Jun 12, 2021

It would be awesome if the behaviour could change a little bit. Navigating through the column should not trigger the input behaviour. Maybe it could improved in the following way:

  • Arrowkeys not trigger any input behaviour.
  • When you press ESC or ENTER/RETURN key you can use the input fields as before. No column change should happen.
  • Press the ENTER/RETURN key to submit the changes to the table data.
  • Press the ESC key to reject changes.
  • Implement a configuration option on table level to disable the behaviour.

Any suggestions on that @yigitfindikli @jsanz1209

@jsanz1209
Copy link

It would be awesome if the behaviour could change a little bit. Navigating through the column should not trigger the input behaviour. Maybe it could improved in the following way:

  • Arrowkeys not trigger any input behaviour.
  • When you press ESC or ENTER/RETURN key you can use the input fields as before. No column change should happen.
  • Press the ENTER/RETURN key to submit the changes to the table data.
  • Press the ESC key to reject changes.
  • Implement a configuration option on table level to disable the behaviour.

Any suggestions on that @yigitfindikli @jsanz1209

+1.

I'm totally right with the behaviour which you had indicated @Tr1monster
Let's see if the PrimeNG team will get back to us with a solution.

@jsanz1209
Copy link

Any news about this??

@luisf96
Copy link

luisf96 commented Nov 24, 2021

It would be awesome if the behaviour could change a little bit. Navigating through the column should not trigger the input behaviour. Maybe it could improved in the following way:

  • Arrowkeys not trigger any input behaviour.
  • When you press ESC or ENTER/RETURN key you can use the input fields as before. No column change should happen.
  • Press the ENTER/RETURN key to submit the changes to the table data.
  • Press the ESC key to reject changes.
  • Implement a configuration option on table level to disable the behaviour.

Any suggestions on that @yigitfindikli @jsanz1209

+1.

Please fix this!!

Input leaving is very confused for users when they just want to edit some character.

@aneesazam
Copy link

Hi everyone

Althouhg it is a feature but in my case this feature is playing a role of searious bug so I disable following methods definition in "\node_modules\primeng\fesm2015\primeng-table.js" and now happy with table:-

onArrowUp(event)
onArrowDown(event)
onArrowLeft(event)
onArrowRight(event)

@lf-novelt
Copy link

hello, and happy new year @yigitfindikli, can we reopen this ticket to make this feature configurable?

@homerchap
Copy link

homerchap commented Apr 18, 2022

I think I have figured out a workaround for it. On the input filed I add this,

(keydown.ArrowRight)="doNothing($event)"

Then in the component I add this function.

doNothing(e: any) {
e.stopPropagation();
return;
}

This is stopping the code in the primeng-table.js from running. You can add ArrowLeft or anything else you want as well.

@luisf96
Copy link

luisf96 commented Jun 28, 2022

I think I have figured out a workaround for it. On the input filed I add this,

(keydown.ArrowRight)="doNothing($event)"

Then in the component I add this function.

doNothing(e: any) { e.stopPropagation(); return; }

This is stopping the code in the primeng-table.js from running. You can add ArrowLeft or anything else you want as well.

That works! Thanks @homerchap

@Yuri-Lima
Copy link

Hey, thanks for that!! @homerchap It works 👍

@thomas-arun
Copy link

I think I have figured out a workaround for it. On the input filed I add this,

(keydown.ArrowRight)="doNothing($event)"

Then in the component I add this function.

doNothing(e: any) { e.stopPropagation(); return; }

This is stopping the code in the primeng-table.js from running. You can add ArrowLeft or anything else you want as well.

@homerchap Thanks you are a life saver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests