Prevent table from scrolling to the top

Hello everyone,

I am working on a project which requires working with tables and editing them. What I do is:

  • run a query and populate the table
  • run an update query to edit the data in the table
  • refresh the binding “props.data”

If user scrolls down in the table and makes a change, then after refreshing the data binding the table scrolls all the way to the top. User has to go back to the position where he made the change.

Is there a way to prevent that from happening or can I make the table scroll to the position of selected row?

Thanks a lot
Jakub

its not really possible, it requires js which isnt exposed in ignition (yet) there where some feautre requests about it but idk if its already done

Well that is very unfortunate. Can you think of any way around it?

I was thinking not using refreshBinding after user edits a row. I might update only the edited row. If I know the index of the dictionary in the list I might run a SELECT for that row and then assign values returned as follows data[n] = {“row”:“items”}.

The thing is, that table will be edited and viewed by multiple users at the same time and they would not see edits by other users in the real time.

Search the forum, here's one that may help,

I do this quite often, scroll to a specific row. Let me know if you need more help, I can send the code I use tomorrow.

Edit, failed to realize you are using perspective.

yeah its similar in js but the fuction isnt exposed by ignition:/

Yeah I was able to find a code that is used in Vision, nothing for Perspective so far.

you could make the table has no scroll and instead use pages i guess?

Right no other solution so far i guess. Dissapointing

or you could create a component that does the js for you.
if you are familiar with it its not that hard of a component id guess

I found out that if I set virtualized property to false, then it stops scrolling away after refreshing.

4 Likes