When using wx:TileList with your own ItemRenderer, you have to remember two important things to avoid scrolling problems:
- If you override the set data method, remember to call super.data = value.
- Remember that the TileList reuses the ItemRenderer instances when scrolling the component! So, if you have a TileList with 5 rows and 5 cols, and an array with 500 elements as DataProvider, it will create about 25 instances of your ItemRenderer, calling the set data method on them when scrolling. So, if you add some child to your ItemRenderer under some data condition (like I did), remember to remove them if the data condition is not valid.

Recent Comments