onBlur is called with old table state #190
-
I am encountering this strange behaviour where if I try to access the table data, inside the on the see here: Both the Button's See image of result of clicking button vs triggering the EDIT: This behavior seems to only occur in DataSheetGrid not in DynamicDataSheetGrid . Is this intended? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @DonHaul, This means that the |
Beta Was this translation helpful? Give feedback.
Hello @DonHaul,
Yes this is intended. As you may know, the default version of DSG is static, and the static version "saves the props it receives on the first render and never updates them".
This means that the
onBlur
function that is called is the one you pass on the very first render. And it displays thedata
that is had when the function was created, here the{}
fromconst [data, setData] = useState({})