Skip to content

Commit

Permalink
fix: table padding and selection (AppFlowy-IO#432)
Browse files Browse the repository at this point in the history
* fix: table padding when it gets scrolled

The handler was getting out of region when table width was wider
than editor size.

* fix: modify scroll view padding
  • Loading branch information
zoli authored Sep 1, 2023
1 parent f205f80 commit 9143c1f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class _TableBlockComponentWidgetState extends State<TableBlockComponentWidget>
Widget child = Scrollbar(
controller: _scrollController,
child: SingleChildScrollView(
padding: const EdgeInsets.only(top: 10, left: 10, bottom: 4),
controller: _scrollController,
scrollDirection: Axis.horizontal,
child: TableView(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class _TableCeBlockWidgetState extends State<TableCelBlockWidget> {
position: widget.node.attributes[TableCellBlockKeys.rowPosition],
transform: context.select((Node n) {
final int col = n.attributes[TableCellBlockKeys.colPosition];
double left = -15.0;
double left = -12;
for (var i = 0; i < col; i++) {
left -= getCellNode(n.parent!, i, 0)
?.attributes[TableCellBlockKeys.width] as double;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class _TableColState extends State<TableCol> {
node: widget.tableNode.node,
editorState: widget.editorState,
position: widget.colIdx,
transform: Matrix4.translationValues(0.0, -15.0, 0.0),
transform: Matrix4.translationValues(0.0, -12, 0.0),
alignment: Alignment.topCenter,
menuBuilder: widget.menuBuilder,
dir: TableDirection.col,
Expand Down

0 comments on commit 9143c1f

Please sign in to comment.