Grid Columns resizing to near 0 after Filter remove

Hello,

I just tried the new Grid (was using only Tables before)

I create the new Grid

grid = new Grid(); grid.setSizeFull(); grid.addStyleName("pointer"); grid.setEditorEnabled(false); and I am creating a new IndexedContainer in a Thread

[code]
final List itemList = BackendService.getAllItems(this.getName());

        container = new IndexedContainer();
        container.addContainerProperty("Title", String.class, null);
        container.addContainerProperty("Tags", String.class, null);

        for (Item item : itemList) {
            com.vaadin.data.Item containerItem = container.getItem(container.addItem());

            List<String> tags = new ArrayList<>();

            for (Tag tag : item.getTags()) {
                tags.add(tag.getTag());
            }

            containerItem.getItemProperty("Title").setValue(item.getTitle());
            containerItem.getItemProperty("Tags").setValue(Joiner.on(", ").join(tags));
        }


        UI.getCurrent().access(new Runnable() {
            @Override
            public void run() {
                grid.setContainerDataSource(container);
                grid.getColumn("Tags").setMaximumWidth(800);
                grid.getColumn("Title").setMaximumWidth(800);
                grid.getColumn("Tags").setMinimumWidth(500);
                grid.getColumn("Title").setMinimumWidth(500);

                titleLabel.setValue("Overview");
            }
        });

[/code]Now i have a TextField that I use as a filter

[code]
filterField = new TextField();
filterField.addTextChangeListener(new FieldEvents.TextChangeListener() {
@Override
public void textChange(final FieldEvents.TextChangeEvent event) {
String filterText = event.getText();

            container.removeAllContainerFilters();

            if (!Strings.isNullOrEmpty(filterText)) {
                Container.Filter filter = new Or(new SimpleStringFilter("Title", filterText, true, false), new SimpleStringFilter("Tags", filterText, true, false));

                container.addContainerFilter(filter);
            }
        }
    });

[/code]Everything is working OK but if I input a value which is not found in the container and THEN deleting the filter
the columns are set so near 0 width.

If I resize the browser manually I get the original Grid Column width.
I tried sending a BrowserResizeEvent after deleting the filter, but it doesn’t help.

Thank you for your help.

20023.jpg

Can you check if this works differently in Chrome and Internet Explorer?

Hello,

same problem in IE 11, Chrome 43 and Firefox 38

I see. I have noticed error of similar type with Grid, but it didn’t occur with IE in my case, but my program code was also a bit different too. Anyway, there seems to be some bugs related to column widths, and those have been reported in dev.vaadin.com.

Ok, Thank you.

Back to table then :stuck_out_tongue: