mirror of
https://github.com/AppFlowy-IO/AppFlowy
synced 2026-05-24 09:38:25 +00:00
fix: no focus border on date cells (#1469)
* fix: no focus border on date cells * fix: remove redundant import * refactor: use existing functionality from GridCellWidget for focus border * refactor: use requestBeginFocus override instead of GestureDetector
This commit is contained in:
parent
9a387b275f
commit
873a46e443
1 changed files with 11 additions and 12 deletions
|
|
@ -70,17 +70,13 @@ class _DateCellState extends GridCellState<GridDateCell> {
|
|||
constraints: BoxConstraints.loose(const Size(260, 500)),
|
||||
margin: EdgeInsets.zero,
|
||||
child: SizedBox.expand(
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () => _popover.show(),
|
||||
child: Align(
|
||||
alignment: alignment,
|
||||
child: Padding(
|
||||
padding: GridSize.cellContentInsets,
|
||||
child: FlowyText.medium(
|
||||
state.dateStr,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
child: Align(
|
||||
alignment: alignment,
|
||||
child: Padding(
|
||||
padding: GridSize.cellContentInsets,
|
||||
child: FlowyText.medium(
|
||||
state.dateStr,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
@ -108,7 +104,10 @@ class _DateCellState extends GridCellState<GridDateCell> {
|
|||
}
|
||||
|
||||
@override
|
||||
void requestBeginFocus() {}
|
||||
void requestBeginFocus() {
|
||||
_popover.show();
|
||||
widget.onCellEditing.value = true;
|
||||
}
|
||||
|
||||
@override
|
||||
String? onCopy() => _cellBloc.state.dateStr;
|
||||
|
|
|
|||
Loading…
Reference in a new issue