diff --git a/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/card_cell_skeleton/text_card_cell.dart b/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/card_cell_skeleton/text_card_cell.dart index 7669145dd7..b86ff495cc 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/card_cell_skeleton/text_card_cell.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/card_cell_skeleton/text_card_cell.dart @@ -163,19 +163,18 @@ class _TextCellState extends State { return BlocBuilder( builder: (context, state) { final content = state.content; - final text = content.isEmpty - ? LocaleKeys.grid_row_textPlaceholder.tr() - : content; - final color = content.isEmpty ? Theme.of(context).hintColor : null; - return Padding( - padding: widget.style.padding, - child: Text( - text, - style: widget.style.textStyle.copyWith(color: color), - maxLines: widget.style.maxLines, - ), - ); + return content.isEmpty + ? const SizedBox.shrink() + : Container( + padding: widget.style.padding, + alignment: AlignmentDirectional.centerStart, + child: Text( + content, + style: widget.style.textStyle, + maxLines: widget.style.maxLines, + ), + ); }, ); } diff --git a/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/editable_cell_skeleton/number.dart b/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/editable_cell_skeleton/number.dart index bae9523207..b218c78195 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/editable_cell_skeleton/number.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/editable_cell_skeleton/number.dart @@ -79,8 +79,11 @@ class _NumberCellState extends GridEditableTextCell { return BlocProvider.value( value: cellBloc, child: BlocListener( - listener: (context, state) => - _textEditingController.text = state.content, + listener: (context, state) { + if (!focusNode.hasFocus) { + _textEditingController.text = state.content; + } + }, child: Builder( builder: (context) { return widget.skin.build( diff --git a/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/editable_cell_skeleton/url.dart b/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/editable_cell_skeleton/url.dart index 1535886ea1..ef18573e1a 100644 --- a/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/editable_cell_skeleton/url.dart +++ b/frontend/appflowy_flutter/lib/plugins/database/widgets/cell/editable_cell_skeleton/url.dart @@ -112,8 +112,10 @@ class _GridURLCellState extends GridEditableTextCell { child: BlocListener( listenWhen: (previous, current) => previous.content != current.content, listener: (context, state) { - _textEditingController.value = - _textEditingController.value.copyWith(text: state.content); + if (!focusNode.hasFocus) { + _textEditingController.value = + _textEditingController.value.copyWith(text: state.content); + } widget._cellDataNotifier.value = state.content; }, child: widget.skin.build(