PDA

View Full Version : How do I force a custom progress bar grid column to update on sorting



RobH
7 May 2020, 10:00 AM
I posted this question on Stack Overflow just over 2 weeks back, but so far, I have had no answers, so I'll ask it here. (Since we're using version 6.0.2, I would have liked to post it in the version 6 forums, but those are closed to new posts. I think this problem may still be relevant for version 7, though.) We're using the classic API.

In the code that I'm working in, there is a grid that has one column that represents the data from two of the store's fields using a customized progressBar. The progress is calculated from those two other fields and shown as text on the progress bar in a format like 'x / y'.

My problem is, when the grid is resorted, and the values of the x and y values are equal (i.e., the progress is 100%) for some or all of the rows, the progress column doesn't get updated properly; the progress bars that are at 100% don't move with their respective rows, and/or progress bars appear to be duplicated or go missing after the sort. Note that this would also happen where the progress is 0 for one or more rows or any other scenarios where the progress of 2 or more rows is the same, but the values used to calculate the progress for the respective rows are different.

Here is a fiddle that illustrates the problem: https://fiddle.sencha.com/#view/editor&fiddle/35c5

Is there some way that I can force the entire progress column (or at least those cells that are at least partially visible) to rerender whenever the grid is sorted, and not just the ones where the calculated progress value has changed, so that all of the progress bars always appear correct?