Skip to content

Commit 0b83684

Browse files
committed
chore: optimaze tap area of row detail cells
1 parent 5bd0fb9 commit 0b83684

File tree

2 files changed

+10
-50
lines changed

2 files changed

+10
-50
lines changed

frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/row/number_cell.dart

Lines changed: 0 additions & 44 deletions
This file was deleted.

frontend/app_flowy/lib/workspace/presentation/plugins/grid/src/widgets/row/row_detail.dart

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@ class _RowDetailCell extends StatelessWidget {
152152
final style = _customCellStyle(theme, gridCell.field.fieldType);
153153
final cell = buildGridCellWidget(gridCell, cellCache, style: style);
154154

155+
final gesture = GestureDetector(
156+
behavior: HitTestBehavior.translucent,
157+
onTap: () => cell.requestBeginFocus.notify(),
158+
child: AccessoryHover(
159+
child: cell,
160+
contentPadding: const EdgeInsets.symmetric(horizontal: 10, vertical: 12),
161+
),
162+
);
163+
155164
return ConstrainedBox(
156165
constraints: const BoxConstraints(minHeight: 40),
157166
child: IntrinsicHeight(
@@ -164,12 +173,7 @@ class _RowDetailCell extends StatelessWidget {
164173
child: FieldCellButton(field: gridCell.field, onTap: () => _showFieldEditor(context)),
165174
),
166175
const HSpace(10),
167-
Expanded(
168-
child: AccessoryHover(
169-
child: cell,
170-
contentPadding: const EdgeInsets.symmetric(horizontal: 10, vertical: 12),
171-
),
172-
),
176+
Expanded(child: gesture),
173177
],
174178
),
175179
),

0 commit comments

Comments
 (0)