[Feature] Navigating to previous and next Record

Hi,
I am working on new small feature navigating to previous or next record(specific doctype) for which I have placed two arrow head near a group of a button. Any suggestion from you guys is welcome, please let me know your reviews.
com-video-to-gif

Regards,
Khushal!

30 Likes

Good one…!!!

1 Like

I could kiss you!

This is sooo needed!!!

Olamide

1 Like

Good thought…why not just have some standard keyboard shortcut for previous and next document

6 Likes

Is the pagination tied to the list and filters in any way? How does it “know” what is next? Ideally this would be derived from the list in some manner. So if I apply a filter and then open a record, the next/previous buttons would be linked to the filtered list.

3 Likes

Yes, that is the way it should work

1 Like

@James_Robertson
Thanks for your views, workiing on that

1 Like

That’s good suggestion.
We can use keyboard Left and Right arrows as shortcut for navigation.

4 Likes

Please refer [Feature] navigate to next or previous Doc(under development) by khushalti ¡ Pull Request #4490 ¡ frappe/frappe ¡ GitHub
Please help to contribute this feature.

Thanks

Did this progress further. It’s a great idea. Keyboard shortcuts would be great too.

How can i test this out? Is it just toolbar.js that is changed?

form.js and toolbar.js in this PR, but I don’t think that all the logic is there; there should be a callback to the server to determine the next or previous document and the sort criteria. There are front end tests written, but it would be highly appropriate/ nearly required to write a new Cypress test for this.

2 Likes

@khushal_t, are you trying to improve this feature? Why GitHub PR is closed? I want to contribute in this feature

as mentioned on the PR

please send a complete PR and reopen / send a new PR
You can take help of someone in the community if you don’t know how to proceed.

I admit this comment is a bit foggy but I am guessing the code was not quite up the contribution guidelines yet.

1 Like

@vrms, the comment becomes less foggy if you also read the PR Description and Title, and look at the code changes. the PR was an incomplete one, there was only a UI added with no functionality.

I think @khushal_t was requesting some Help from the community regarding the PR. Hopefully, @dam_89 can collaborate and complete this feature. It would be a neat feature to have in ERPNext. :slight_smile:

If you can do it in the tab list, inside the docs…

yes it was just idea to put forth i did not make it complete PR, i shall be working on that

1 Like

ok thanks… I will try to do it… it seems very difficult because the feature is related with the list, filters, order, etc…

This feature is now merged :tada:
https://github.com/frappe/frappe/pull/7777

6 Likes

Hi, thanks for the feature…

I was testing it. When a list is ordered by “creation on” or “last modified on” it has a problem:

image

Hi @dam_89!

I can’t reproduce this error, it works fine for me if the list is sorted by last modified on and created on. Is there any more information you can give me regarding this error? What is the error on the browser console?