[PR #1140] [MERGED] grid: fix pressing enter on an option that already exists recreates it #4554

Closed
opened 2026-03-23 21:38:19 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/1140
Author: @richardshiue
Created: 9/23/2022
Status: Merged
Merged: 9/25/2022
Merged by: @appflowy

Base: mainHead: improv-select-options


📝 Commits (1)

  • edd9128 fix: press enter to create or select option in text field

📊 Changes

3 files changed (+40 additions, -5 deletions)

View changed files

📝 frontend/app_flowy/lib/plugins/grid/application/cell/select_option_editor_bloc.dart (+35 -0)
📝 frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_editor.dart (+2 -2)
📝 frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/text_field.dart (+3 -3)

📄 Description

https://user-images.githubusercontent.com/71320345/191922686-d486dcaf-893e-4f8a-9974-92237ed05092.mp4

The new logic is as follows:
If there aren't any matches, then create it.
If there is an unselected option that matches, then select it and clear filter.
If there is a selected option that matches, then clear filter.

The logic works as intended, but it seems messy. How can I make it better?


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/1140 **Author:** [@richardshiue](https://github.com/richardshiue) **Created:** 9/23/2022 **Status:** ✅ Merged **Merged:** 9/25/2022 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `improv-select-options` --- ### 📝 Commits (1) - [`edd9128`](https://github.com/AppFlowy-IO/AppFlowy/commit/edd9128046a4ec8f4756cfb05c113cc44045b0b3) fix: press enter to create or select option in text field ### 📊 Changes **3 files changed** (+40 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `frontend/app_flowy/lib/plugins/grid/application/cell/select_option_editor_bloc.dart` (+35 -0) 📝 `frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_editor.dart` (+2 -2) 📝 `frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/text_field.dart` (+3 -3) </details> ### 📄 Description https://user-images.githubusercontent.com/71320345/191922686-d486dcaf-893e-4f8a-9974-92237ed05092.mp4 The new logic is as follows: If there aren't any matches, then create it. If there is an unselected option that matches, then select it and clear filter. If there is a selected option that matches, then clear filter. The logic works as intended, but it seems messy. How can I make it better? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 21:38:19 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#4554
No description provided.