0

After you have chosen a field name, then you start typing in the value textbox, the dropdown defaults to a width of 150px which causes lots of things to be cut off. A scrollbar shows up so you can scroll left and right, but I would like to figure out how to set the minimum width of this element.

The css path to the element defining this is:

body > div.gwt-SuggestBoxPopup > div > table > tbody > tr.suggestPopupMiddle > td.suggestPopupMiddleCenter > div > div

It seems to be an inline style in the element

<div class="" style="overflow: auto; position: relative; zoom: 1; height: 322px; width: 150px;">

The field dropdown seems to re-size dynamically, so it does not get scroll bars, the suggest box starts at 150px and resizes sometimes, but it doesn't seem to have any rhyme or reason.

I added the following to my stylesheet:

.suggestPopupMiddleCenter > div > div { min-width: 300px; !important }

But that also affects the field dropdown, which appears to be working properly.

Is this a bug, or is there a configuration that I can use that will allow the value suggestion box dropdown to dynamically resize based on the widest element?

Severun
  • 2,893
  • 1
  • 16
  • 22

1 Answers1

0

It is hard wired in the tardis branch https://github.com/salk31/RedQueryBuilder/blob/tardis/redquerybuilder-core/src/main/java/com/redspr/redquerybuilder/core/client/expression/SuggestEditorWidget.java#L107

It probably could use some rule to choose the width. Best if you raise a bug and make a suggestion?

salk31
  • 995
  • 2
  • 8
  • 13
  • Perhaps it would be good to have a class name somewhere so you could target one or the other popup menu. – salk31 Apr 11 '15 at 09:19
  • That's actually not a bad idea. I've been using the Nth occurence to solve, like second occurence of gwtSuggestBox, etc, but if each had a different class, like gwtSuggestBox-1, gwtSuggestBox-2, you could directly reference the first second, third iterations of the suggest box. I'll open an issue with that request, if that sounds like a good path to go down. – Severun Apr 13 '15 at 18:37
  • Sounds sensible. I'd like RQB to be easy to style. – salk31 Apr 14 '15 at 12:44