colReorder, createdCell and ajax in react
colReorder, createdCell and ajax in react
![percyquilla](https://secure.gravatar.com/avatar/a12f1d83562e819e102784abe1289014/?default=https%3A%2F%2Fvanillicon.com%2Fa12f1d83562e819e102784abe1289014_200.png&rating=g&size=120)
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