Search code examples
javascriptrestextjsodata

What is the difference between the BufferedStore and the BufferedRenderer plugin in Ext JS 6.2


I'm having a heck of time getting ExtJS 6.2 to work with infinite scrolling. I've been through their docs and examples many times and I can't get it to work. I'm wondering if I just am misunderstand how the BufferedStore works and how is it different from the BufferRenderer plugin.

Can someone please explain the differences between the two and which one would I use to get infinite scrolling to work with a oData Rest API using their Ext.grid.Panel class.


Solution

  • BufferedStore controls the way the data store loads data. Instead of grabbing the entire data set, it loads data in 'pages' as required eg. when the data is requested. BufferedRenderer works on the grid view side, it basically renders a subset of grid rows - rather than rendering everything thats in the store connected to the grid.

    In the old days of ExtJS :) - grids would load everything from the store, so potentially you might have thousands of rows. These would not be visible of course you would only see them when you scroll, but they were in the dom hence it would take time.

    If you have a lot of data in the grid, you usually use both, but I have had situations where I want everything in the store, but not in the grid - eg if I need to sort or manipulate data in the store prior to rendering.