colReorder, createdCell and ajax in react
colReorder, createdCell and ajax in react
percyquilla
Posts: 3Questions: 0Answers: 0
in ColReorder
Hi, I'm using React and I have some problems with colReorder, what happens is that the button is lost when using colReorder, example here: https://jsfiddle.net/15sjw3cz/47/
help please.
I render the button from createdCell, it only happens when I use ajax (in the example the constant data simulates the response of an API)
Replies
This is going to be tricky as
createdCell
only runs once in the life time of a cell. And moving columns doesn't count as creating new cells (since they aren't they are reused).I don't know React well enough to suggest the way forward with ColReorder I'm afraid. Can you return the text for the button HTML and then use a delegated event handler?
Allan
Thanks @allan, I will return the text of the HTML button