1

I am using Angular slickgrid to display my data, issue is when we click on any cell, row or checkbox, page moves up to starting element. Instead of moveing up page should stay as it is.

From DOM I found active element is '<div tabindex="0" hidefocus="" style="position:fixed;width:0;height:0;top:0;left:0;outline:0;"></div>'

When I delete above line, then it stop moving page up on click on any cell and working properly as per proper behaviour.

Here is my code:

<section id="order-grid">
    <div class="row">
      <div class="col-12" id="demo-container">
        <angular-slickgrid #slickGrid [gridId]="orderGrid" (onAngularGridCreated)="angularGridReady($event)"
        [columnDefinitions]="orderTableColumns" [gridOptions]="orderGridOptions" [dataset]="orderItems"
         (sgOnClick)="onCellClicked($event.detail.eventData, $event.detail.args)"
         (sgOnCellChange)="onCellChanged($event.detail.eventData, $event.detail.args)">
      </angular-slickgrid>
        </div>
    </div>
</section>

Grid options are:

this.orderGridOptions = {
      asyncEditorLoading: true,
        autoCommitEdit: true,
      
      autoResize: {
        containerId: 'demo-container',
        sidePadding: 15
      },
      enableAutoResize: true,
      editable: true,
      enableCellNavigation: true,
      enableFiltering: true,
      enableRowSelection: true,
      rowSelectionOptions: {
        selectActiveRow: true
      },
    };

here is link for behaviour: https://app.box.com/s/gwoks1buvncz8q6bebd2t0bym4tf1tw7

I would appreciated when you give me some solution why this is happens

rp07
  • 43
  • 6
  • I'm the author of Angular-Slickgrid and I find your question really hard to understand. You also did not include any code in your question, except for that DOM element. So I can't really help you and I don't think any other person could help you either, please provide more info to your question to at least understand the context. Also you might be describing an issue with SlickGrid, just a reminder that Angular-Slickgrid is a wrapper on top of SlickGrid – ghiscoding Jun 22 '20 at 15:11
  • Hi @ghiscoding, i have updated my question, please have a look on this. – rp07 Jun 22 '20 at 18:54
  • I still don't understand your question, also to add an image or an animated gif here, just copy & paste it then it will show up in the question. The code does not help, I don't understand your problem, perhaps the content of `sgOnClick` or `sgOnCellChange` but again what is the question? It's not very clear – ghiscoding Jun 22 '20 at 21:49
  • I think i understand the problem. @RichaPatel problem is of auto scroll to top when we click on any row of angular slick grid is that so ? – Hiral Bhimani Jun 23 '20 at 04:21
  • i guess issue is like that when you click on angular slick grid row it automatically re-render whole table and it throw to the top of page – Hiral Bhimani Jun 23 '20 at 04:24
  • yes, perfect you got my point, My issue is page scroll to top position(autoscroll) when i click on any cell of grid. Instead of page's auto scroll, page should stay as it is without scrolling to top. – rp07 Jun 23 '20 at 05:24
  • Hi @ghiscoding any update on this? Are you getting what i am trying to say? – rp07 Jun 24 '20 at 18:18
  • I'll let @Hiral Bhimani answer since he seem to understand your issue, sorry but I have plenty of other things to do, I would prefer someone else answer, especially so if that other person understands the question. Good luck – ghiscoding Jun 24 '20 at 21:13

0 Answers0