How can I change the width of the field dropdown in Query Builder to size to the width of the content?

I am attempting to change the size of the dropdown for the field list in query builder so that the full name of the field is displayed. Some of our fields have rather long names, and the data sets are dynamic, so they could be of any length. So far the only thing I have been able to do is to increase the width of the entire control by using the following CSS:

.e-filter-input {
  width350px !important;
}

This does change the dropdown control to 350 pixels; however this may not be long enough in some cases.
Ideally I would be able to set the width of the input control to a fixed size, but have the dropdown/popup list resize to dynamically fit the width of the longest field name. Is there currently a way to do this with the Query Builder control?

Inspecting the HTML, I found when the popup is open there is a div created with class e-popup-open. The div seems to have the style set to the width of the input control + 25 pixels. Trying to override the style for class did not work, even to a hard-coded amount.

If there is not currently a way to manipulate the CSS, I would request an enhancement to allow the popups for dropdowns to have an auto size width.

3 Replies 1 reply marked as answer

GK Gayathri KarunaiAnandam Syncfusion Team March 22, 2021 02:24 PM UTC

Hi Michael, 

Thank you for contacting Syncfusion support. 

We have checked your reported query. We have already considered Model support for QueryBuilder as an improvement. By using this Support, you can set the popupwidth to Querybuilder. This support will be available in our 2021 Volume 1 release which will be scheduled on the end of March 2021. 

We appreciate your patience until then. 

Regards, 
Gayathri K 


Marked as answer

ME Michael Evans March 22, 2021 02:29 PM UTC

That's perfect, thank you for the update.


GK Gayathri KarunaiAnandam Syncfusion Team March 24, 2021 05:16 AM UTC

Hi Michael, 

Thanks for the update. 

We are happy to hear that your requirement has been fulfilled. Please feel free to contact us if you need any further assistance on this. 

Regards, 
Gayathri K 


Loader.
Up arrow icon