Fix: addEditSheet is not initialized reliably
Fix: in the current state of the tutorial, addEditSheet is not properly/reliably initialized:
-
openPopulateSheet
only passes values (or default values) in "edit" mode, but is also called for 'add' mode, the unnecessary if-condition can be removed - The initialization of the text fields in addEditSheet via
text: mode === "add" ? "" : name
does not seem to work reliably for the text property:- Add a Kountdown to the list
- Try to add a second element: addEditSheet should be empty but still contains the values of the last added element