DataRepeater batching and non-batching updates.

edited March 2015 in Enyo 2.4
I've run into a subtle error in my application where I'm not sure if I'm running into a bug or not.

I've got a DataRepeater with a Panels component as container. I have noticed that, if I add items using the modelsAdded method, a 'batching' flag is set which prevents new controls from being rendered until all controls have been generated. When the batching is done, the batchingChanged method renders the container, which makes the container reflow and - in my case - arrange it's panels.

However, when I'm using the refresh or reset methods, no batching flag is set and each child is rendered pretty much immediately. This means the container does not reflow, and added panels will not be arranged.

I realize the enyo 2.5.x implementation of DataRepeater is different, so I decided to look at the source there too and I noticed in 2.5.x the batching flag is not used at all and the container doesn't reflow at all unless I explicitly tell it to. The batching flag and batchingChanged callback are still left in place though.

I was wondering has the DataRepeater converged on consistently not batching on purpose? Is it not desirable to have batching turned on by default? Is the current behaviour a bug or a feature? Or would it make sense to create a flag to enable and disable batching and re-rendering the container? If any changes are desirable, let me know, I can make a pull-request for it.
Sign In or Register to comment.