Action after deleting a row #304
Replies: 1 comment 1 reply
-
|
Hi @StewartLynch, the But, you can force the state held in func deletePropertyButtonTapped(property: Property) async {
await withErrorReporting {
try await database.write { db in
try Property
.delete(property)
.execute(db)
}
try await $properties.load()
self.selectedProperty = self.properties.first
}
}Note that |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In my model where I have this
I have this function that is called when I delete a row.
The only way I can get the selectedProperty to update is if I have this short sleep in the function otherwise it does not update as shown. It works perfectly, but I can’t be doing this the correct way. if else clause needs to wait until the deletion is complete.
Pardon my SQL ignorance here.
Beta Was this translation helpful? Give feedback.
All reactions