Why doesn't the data in the table change, even though the data has been updated? #120
Unanswered
bobwatcherx
asked this question in
Q&A
Replies: 1 comment
-
You are mutating data, that can not be detected. To avoid doing that I recommend using frozen dataclasses: @dataclasses.dataclass(frozen=True)
class Fakedata:
name: str
age: int Then your edit will be: def updatedata():
mydata_copy = mydata.value.copy()
for i, x in enumerate(mydata.value):
if i == idselect.value:
mydata_copy[i] = Fakedata(name, age)
print(x)
mydata.value = mydata_copy Now because we update the mydata.value, we trigger a rerender.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i want to create crud with table dataframe . when edited and printed the data has changed. but why doesn't the data in the table change? and when deleted . the data should have been deleted. but in the table why is it still the same and it looks like nothing has changed
Beta Was this translation helpful? Give feedback.
All reactions