Serenity: Increase width of quickfilter

Created on 1 Apr 2019  路  2Comments  路  Source: serenity-is/Serenity

I want to increase the width of quickfilter dynamically to content length better or fixed length.

image

Any solution please.

I tried using CSS but did not succeed.

Thank you

Most helpful comment

  1. Add cssClass to the filter
protected getQuickFilters() {
    var flt = super.getQuickFilters();
    var supplier = Q.tryFirst(flt, f => f.field == ProductRow.Fields.SupplierID);
    supplier.cssClass = 'supplier-filter';

    return flt;
}
  1. Add style in less file
.s-Northwind-ProductGrid {
    .supplier-filter {
        .select2-container {
            width:300px !important;
        }
    }
}

All 2 comments

  1. Add cssClass to the filter
protected getQuickFilters() {
    var flt = super.getQuickFilters();
    var supplier = Q.tryFirst(flt, f => f.field == ProductRow.Fields.SupplierID);
    supplier.cssClass = 'supplier-filter';

    return flt;
}
  1. Add style in less file
.s-Northwind-ProductGrid {
    .supplier-filter {
        .select2-container {
            width:300px !important;
        }
    }
}

@promiseap2014
thank you very much

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stepankurdylo picture stepankurdylo  路  3Comments

Akarsh03 picture Akarsh03  路  3Comments

ga5tan picture ga5tan  路  3Comments

john20xdoe picture john20xdoe  路  3Comments

Shraddha996 picture Shraddha996  路  3Comments