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

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
OliverRodrigues
Super User II
Super User II

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 Apps Portals Super User


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 Apps Portals Super User


Oliver Rodrigues


 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (30,881)