You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Jotai to create a checkbox list of selectable accounts. I am using the toggleAccountByAddress derived atom to add to/remove from a selectedAccounts array of strings that keeps track of selected account addresses. Then I use selectedAccounts.includes(account.address) to updates the checked attribute.
The array does in fact update but the changes are not reflected in the UI (checked attribute)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug Description
I am using Jotai to create a checkbox list of selectable accounts. I am using the
toggleAccountByAddress
derived atom to add to/remove from aselectedAccounts
array of strings that keeps track of selected account addresses. Then I useselectedAccounts.includes(account.address)
to updates thechecked
attribute.The array does in fact update but the changes are not reflected in the UI (
checked
attribute)Run code on Stackblitz
You can run the code here: https://stackblitz.com/edit/stackblitz-starters-vnpghv4r?file=app%2Fpage.tsx
Code
Reproduction Link
https://stackblitz.com/edit/stackblitz-starters-vnpghv4r?file=app%2Fpage.tsx
Beta Was this translation helpful? Give feedback.
All reactions