How to remove empty columns when fetching dynamic data in ion segments?

Whenever I am fetching data dynamically in ion-segment using Ng, the data in the first segment ie “ALL” is being appropriately fetched but in my remaining segments, empty columns are being displayed along with items. Suppose if I am fetching 5 items in my first segment (all category) and 3 items in the second segment, I am getting additional 2 columns empty along with those 3 items. Please check the screenshot and code. I am stuck in this since two days, pls help!