there are some ways:
1. .container::after{content:'';flex:auto;}
2. making items amount just certain integer times of row items amount, then the last items that are displaying for non-data has css{
visibility:hidden;}, this takes up space but just not displayed.