colReorder, createdCell and ajax in react

colReorder, createdCell and ajax in react

percyquillapercyquilla Posts: 3Questions: 0Answers: 0

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

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    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

  • percyquillapercyquilla Posts: 3Questions: 0Answers: 0

    Thanks @allan, I will return the text of the HTML button

Sign In or Register to comment.