Results 1 to 6 of 6

Thread: Modern Grid Renderer Problem when changing Store Page Size.

  1. #1

    Default Modern Grid Renderer Problem when changing Store Page Size.

    Hi,

    I noticed that my grid elements (when using renderer to display icons depending on the value...) are repeating the first 25 renderers after changing the store pagesize from 25 to 50 (or 100) and then reloading the store.

    Is it a bug?

    Thanks in advance.

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Sounds like one. Are you able to recreate this in a test case?

  3. #3

    Default

    I guess so. How should I proceed?

  4. #4
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    It would be great if you could post a Fiddle or other runnable test case so we can recreate and file a bug to get it fixed.
    https://fiddle.sencha.com/#view/editor

  5. #5
    Sencha Premium User
    Join Date
    Mar 2017
    Posts
    21

    Default

    Hi!
    Grid renderer is trying to manage scrolling by caching rows, reusing them and calling renderer each time the cell needs to be re-rendered.
    This causes some issues.
    Maybe you're getting into that one.

    Code:
    flagRenderer: function(value, record, dataIndex, cell, column) {
     // add 'class="flagVALUE"' to the cell 'flag'
     cell.addCls(dataIndex + value);
    }
    This renderer is just adding cls to my column 'flag' :
    Code:
    <div data-componentid="ext-gridcell-143" class="x-gridcell x-align-center x-fa fa-circle flag0"></div>
    But when scrolling down, then top, then down, ... all my cells for the column were getting all the possible values (flag0, flag1, flag2).
    Code:
    <div data-componentid="ext-gridcell-143" class="x-gridcell x-align-center x-fa fa-circle flag0 flag1 flag2"></div>
    Workaround : do not use addCls but setCls. If you already use cell : {cls: 'x-fa fa-circle'} on your column, then use setUserCls

    Code:
    flagRenderer: function(value, record, dataIndex, cell, column) {
     cell.setUserCls(dataIndex + value);
    }

  6. #6

Similar Threads

  1. Ext JS 6 modern grid column renderer no html support
    By lubendo in forum Ext JS 6.x Q&A
    Replies: 5
    Last Post: 18 Oct 2016, 7:46 AM
  2. Replies: 1
    Last Post: 10 Jul 2014, 12:08 AM
  3. Replies: 2
    Last Post: 8 Jan 2013, 1:03 PM
  4. PagingToolBar failure when changing page size dynamically
    By d95sld95 in forum Ext GWT: Discussion
    Replies: 5
    Last Post: 7 Oct 2009, 12:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •