flutter_html icon indicating copy to clipboard operation
flutter_html copied to clipboard

[Bug] Table Column Display Bug

Open Huanxin1997 opened this issue 4 years ago • 4 comments

image When we use flutter_html to render table, UI bug is happened because the width of table is larger than screen.

We try modifying the code in layout_element.dart _layoutCells function. Then the table can be scroll horizontally.

Would you please help us to support this issue? Or is there any solution can solve table display issue? image

Huanxin1997 avatar Nov 17 '21 06:11 Huanxin1997

Try this:

          customRender: {
            "table": (context, child) {
              return SingleChildScrollView(
                scrollDirection: Axis.horizontal,
                child:
                    (context.tree as TableLayoutElement).toWidget(context),
              );
            },
          },

erickok avatar Nov 17 '21 08:11 erickok

Try this:

          customRender: {
            "table": (context, child) {
              return SingleChildScrollView(
                scrollDirection: Axis.horizontal,
                child:
                    (context.tree as TableLayoutElement).toWidget(context),
              );
            },
          },

I try this in version 2.1.5 and it works like below, image but when I upgrade to 2.2.0, it test table is cover on the "task due". image seems this is a issue on version 2.2.0? I both put the Html widget inside a Container without fixed height. @erickok

Jim-S-Chang avatar Dec 09 '21 08:12 Jim-S-Chang

So is there still a bug or not (on the latest flutter_html, version 2.2.1)?

erickok avatar Dec 14 '21 09:12 erickok

So is there still a bug or not (on the latest flutter_html, version 2.2.1)?

it still happens on 2.2.1, but doesn't on 2.1.5 @erickok

Jim-S-Chang avatar Dec 14 '21 09:12 Jim-S-Chang

The latest version 3.0.0-beta.1 fixes some bugs with tables. See #1262 for a discussion on how to wrap a table in a scrollview in that version.

Sub6Resources avatar May 17 '23 20:05 Sub6Resources