cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TheIntern
Helper II
Helper II

Scroll issue entity list

I am displaying 5+ entity lists on a page using entity_list liquid tag. Each of these views has a view selector.

 

The problem is, when i change the view on the first/second grid, the page is scrolled to the bottom by default.

 

Is there a way to stop this behaviour? Or fund out the change event of the view selector to stop the scrolling? 

4 REPLIES 4
v-jefferni
Community Support
Community Support

Hi @TheIntern ,

 

Since it's difficult to repro the issue in others' environments, if it is quite urgent and you prefer a real-time communication, we would propose you to submit a ticket like below:

 

 The steps to open Power Automate/Power Apps ticket:

 

1. Sign in to Power Platform admin center: https://admin.powerplatform.microsoft.com/ 

 

2. Click "Help + support" to create a support request:

68.png

 

3. The entry to create a support ticket in the Power Apps/Power Automate portal:

69.png

 

Thank you for your understanding.

 

Best regards,
Community Support Team _ Jeffer Ni

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

OliverRodrigues
Super User
Super User

Hi, I would suggest trying to add a listener to the onload of each entity list, you can change the .eq(0) to each entity list index you might have

var list = $(".entitylist.entity-grid").eq(0);
list.on("loaded", function() {
 /// set focus to the top of the page or whatever you need
});

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

Hi Oliver,

 

Thanks for your response.

 

While this does work for subsequent loads, it also scrolls to the entity list on page load. Would it be possible to achieve something like this on change of the view using view selector?

Hi

 

I was playing here and came up with an example - I have 6 entity lists that I am loading via Liquid and I also have view selector for all of them

I am adding some variables to control the first load time (very old fashioned I know, but does the job), and you can check those like my example on list 6

in my tests the onload event was also triggered during the view selector change as well

var firstLoadList1 = true;
var firstLoadList2 = true;
var firstLoadList3 = true;
var firstLoadList4 = true;
var firstLoadList5 = true;
var firstLoadList6 = true;

$(document).ready(function(){
  SetListOnLoadEvents();
});

function SetListOnLoadEvents()
{
  var list = $(".entitylist.entity-grid").eq(0);
    list.on("loaded", function() {
      list.focus();
      console.log("1");
  });
  list = $(".entitylist.entity-grid").eq(1);
    list.on("loaded", function() {
      list.focus();
      console.log("2");
  });
  list = $(".entitylist.entity-grid").eq(2);
    list.on("loaded", function() {
      list.focus();
      console.log("3");
  });
  list = $(".entitylist.entity-grid").eq(3);
    list.on("loaded", function() {
      list.focus();
      console.log("4");
  });
  list = $(".entitylist.entity-grid").eq(4);
    list.on("loaded", function() {
      list.focus();
      console.log("5");
  });
  list = $(".entitylist.entity-grid").eq(5);
    list.on("loaded", function() {
      if(firstLoadList6){
        firstLoadList6 = false;
        console.log("First Load 6");
      }
      else{
        list.focus();
        console.log("6");
      }
  });
};

 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Users online (4,637)