You could possibly do it with dynamic classes. The differnce between auto-fit & auto-fill is the following in css-classes:
Auto-fit = .col-lg-auto .col-md-auto .col-sm-auto .col-auto
Auto-fill = .col-lg .col-md .col
I'd make 'm auto-fill, and depending on your boolean variable dynamically add the -auto classes, they should overwrite the base classes.