Code Monkey home page Code Monkey logo

Comments (8)

trestletech avatar trestletech commented on June 29, 2024

Any updates or workarounds for this bug? This widget would be perfect for a project I'm working on, but the drop-down gets clipped by the <g:center> panel.

from gwtchosen.

trestletech avatar trestletech commented on June 29, 2024

FYI - there's a thorough discussion of this problem in a Chosen thread here: harvesthq/chosen#86

from gwtchosen.

trestletech avatar trestletech commented on June 29, 2024

I spent some time fiddling with it and came up with the following hack to workaround the issue:

In a UiBinder configuration such as:

        <g:north size = '80'>
            <g:HTMLPanel ui:field="headerContainer">
                <g:SimplePanel ui:field="header"/>        
                <g:SimplePanel ui:field="searchBar"/>
            </g:HTMLPanel>
        </g:north>

You can tell the north element to allow overflows (i.e. allow the drop-down selector to extend below its bounds) using the following code in the view's constructor:

    headerContainer.getElement().getParentElement().getStyle().setOverflow(Overflow.VISIBLE);

This allows the north panel's contents to spill below the 80 pixel limit set in UIBinder. Note that this works great if your header's content is indeed shorter than 80px, but would cause all sorts of messes if your header's content were larger than its allocated bounds.

Not an ideal solution, nor will it work for everyone, but it solved my issue!

from gwtchosen.

jDramaix avatar jDramaix commented on June 29, 2024

Definitely, it's an issue I have to resolve but like it is said in the chosen issue you mention, it's not trivial.

Thanks for the workaround !
you can rewrite it by using GQuery like this :
$(headerContainer).parent().css("overflow", "visible");

from gwtchosen.

trestletech avatar trestletech commented on June 29, 2024

Sure thing. Just food for thought: I have a GWT suggestBox adjacent to this gwtchosen box which extends beyond the limits of the DockLayoutPanel with no trouble (and works as expected when scrolled, etc.) I wonder if that code could be the basis for a GWT-based solution to the problem at some point in the future.

from gwtchosen.

komasoftware avatar komasoftware commented on June 29, 2024

In gwt-bootstrap, the same issue is raised : gwtbootstrap/gwt-bootstrap#231
GWT layout system is simply not playing nice with other css/js frameworks;

from gwtchosen.

sillysachin avatar sillysachin commented on June 29, 2024

Is there any chance the non-trivial fix from this branch https://github.com/gil/chosen/commits/new_version gets ported to GWTChosen?
GWTChosen is awesome. However, in current state it cannot be used with LayoutPanels at all.

from gwtchosen.

jDramaix avatar jDramaix commented on June 29, 2024

Not sure it's the good solution

from gwtchosen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.