react-bootstrap-table2 icon indicating copy to clipboard operation
react-bootstrap-table2 copied to clipboard

Switch between editable cells using tab not working.

Open elad823 opened this issue 8 years ago • 29 comments

When pressing tab in edit mode, the edit mode is going out.

https://react-bootstrap-table.github.io/react-bootstrap-table2/storybook/index.html?selectedKind=Cell%20Editing&selectedStory=Click%20to%20Edit&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel

elad823 avatar Feb 14 '18 14:02 elad823

@elad823 yes, this feature is still not implement, I'll implement it ASAP, thanks

AllenFang avatar Feb 14 '18 15:02 AllenFang

@AllenFang Any update on this? I have a fix on a local branch, if I can get permissions I will create a pull request for it.

teresa-recursion avatar Jun 26 '18 21:06 teresa-recursion

@teresa-recursion sorry, I'm working on the expand row and new react context API design. For the tab to navigate the cell editing, I think I will recommend you to implement the cell navigation before this.

Do let me know if you really want to open a PR for this, I think I will implement the cell navigation in July or Aug.

AllenFang avatar Jul 01 '18 05:07 AllenFang

@AllenFang by cell navigation, do you mean using the arrow keys to move up/down/left/right? My PR includes that. If not, what do you envision for cell navigation?

teresa-recursion avatar Jul 09 '18 17:07 teresa-recursion

@teresa-recursion Could you share your solution? I came up with one (basically just calling blur on the current control, and click on the next) that works great on FF and Chrome, but not on IE. Any help would be greatly appreciated.

royjer avatar Jul 25 '18 15:07 royjer

@royjer my basic approach was to add key handling in editing-cell.js

image

and then pass it up to wrapper.js

Uploading image.png…

I don't have permissions to create a branch, otherwise I would share it with you. I'm not sure this is the direction @AllenFang is going to go with this, but it works. I haven't tested in IE, let me know how that goes! :)

teresa-recursion avatar Jul 25 '18 15:07 teresa-recursion

Awesome. Thanks! I'll let you know.

royjer avatar Jul 25 '18 15:07 royjer

@teresa-recursion can you please share onFocusNext()?

royjer avatar Jul 25 '18 15:07 royjer

image

teresa-recursion avatar Jul 25 '18 20:07 teresa-recursion

https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/433

AllenFang avatar Aug 04 '18 08:08 AllenFang

Hello guys i am facing the same problem right now. I am using those versions of react-table packages:

"react-bootstrap-table-next": "^1.1.4", "react-bootstrap-table2-editor": "^1.0.1", "react-bootstrap-table2-filter": "^1.0.0", "react-bootstrap-table2-toolkit": "^1.0.3",

I have tried to implement @teresa-recursion approach but i think that those change were made on older versions then the one i am using. Do we have any update on the keyboard navigation @AllenFang ?

Could this keyHandle be implemented outside of the component, maybe?

@royjer i saw that you resolved that using the blur method... Can you explain better your approach? I would be very glad!!

Besides that you did a very great job @AllenFang ! Cheers for that !

Zalkya avatar Oct 08 '18 20:10 Zalkya

Hey, @AllenFang This feature implemented already? using tab to navigate in editing mode?

Thanks !

MaorBenAmi avatar Jan 15 '19 11:01 MaorBenAmi

@MaorBenAmi sorry for lately reply, we are not yet to implement the keyboard navigation, I hope I can finish before this Q2, probably April

AllenFang avatar Feb 10 '19 15:02 AllenFang

Is this still on track for Q2? we are going to have to make a judgement call to move to a different Component soon, would love to hold out, but cant much past mid-April

DrogoNevets avatar Mar 19 '19 15:03 DrogoNevets

Any update on using Tab to navigate between cells ? I agree with DrogoNevets, missing of this feature could be a deal breaker for many.

mpeng avatar May 21 '19 16:05 mpeng

I am able to follow code samples provided by @teresa-recursion and @royjer to implementate the features in the latest version, thank you both !

mpeng avatar Jun 01 '19 12:06 mpeng

@mpeng i didn't understand what you just said. Where you able to impement the Tab Navigation? Or not? You would be a god if you were able to do this and provide us a pull request haha!

@DrogoNevets didi you guys moved to another component or just implemented something to overcome the Tab Navigation?

Zalkya avatar Jun 01 '19 15:06 Zalkya

@xxporkoxx We moved to react-data-grid there wasn’t any response from the maintainers or guidance on timeline or anything

DrogoNevets avatar Jun 01 '19 16:06 DrogoNevets

@xxporkoxx , what I mean is I made the changes based on the latest version 3.1.2.

I made the changes locally to handle Tab and four arrow keys and uses the file as part of my app.

I attached the entire file I am using to this thread. Just change the extension from 'txt' to 'js' and reference it in your code. It should work. The only thing I hard-coded is the # of column. My table has 7 columns and first column is not editable. See below

if (nextCol >= 7 ) {
      nextCol = 1;
      nextRow += 1;
    } else if (nextCol <= 0) {
      nextCol = 7 - 1;
      nextRow -= 1;
    }

I also changed the default type from 'text' to 'number" to suit my needs.

If you diff the file I attached with the file from npm, you will see all the changes I made.

Let me know if this helps.

Like I said before, this feature is a dealbreaker for me and I was also tempted to use react-data-grid, but decided against it and implementated the change instead. It turned out to be a easy change.

react-bootstrap-table2-editor.txt

mpeng avatar Jun 01 '19 18:06 mpeng

Sadly , this feature was not included in the latest version 1.2.4 @AllenFang any news about it ?

LoicHa avatar Jun 14 '19 15:06 LoicHa