fix double enter bug

This commit is contained in:
James Turk 2025-01-10 00:13:12 -06:00
parent 45778192e2
commit bf0fe6f2d7
3 changed files with 4 additions and 3 deletions

View File

@ -1,8 +1,8 @@
import json import json
from datetime import datetime from datetime import datetime
from peewee import fn from peewee import fn
from ..db import db, Task, Category, TaskStatus, SavedSearch
from peewee import Case, Value from peewee import Case, Value
from ..db import db, Task, Category, TaskStatus, SavedSearch
def category_lookup(category): def category_lookup(category):

View File

@ -360,7 +360,6 @@ class TableEditor(App):
# preprocess/validate the field being saved # preprocess/validate the field being saved
try: try:
update_data[field] = cconf.preprocessor(new_value) update_data[field] = cconf.preprocessor(new_value)
# raise Exception(update_data)
self.update_item_callback(item_id, **update_data) self.update_item_callback(item_id, **update_data)
self.refresh_data() self.refresh_data()
except NotifyValidationError as e: except NotifyValidationError as e:

View File

@ -91,7 +91,9 @@ class TT(TableEditor):
self._load_view(event.value) self._load_view(event.value)
self.refresh_tasks(restore_cursor=False) self.refresh_tasks(restore_cursor=False)
else: else:
super().on_input_submitted(event) # https://textual.textualize.io/guide/events/#bubbling
# not needed
# super().on_input_submitted(event)
return return
def refresh_items(self): def refresh_items(self):