"setData"-event not triggered when removing rows

"setData"-event not triggered when removing rows

Maha80Maha80 Posts: 30Questions: 10Answers: 1

Hi Allan,

I have to filter and edit data after performing a CRUD operation. While using the "setData" listener, I have noticed that it is not triggered when removing elements. I only get 'create' and 'edit'. Is this a bug or do I have to return something different from an empty Object from ajax?

Thx for ur help!

Best regards
Martin

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    Answer ✓

    Hi Martin,

    Thanks for noting that. You are correct - it is a bug I'm sorry to say.

    As a workaround just listen for preRemove in addition to the setData event (or perhaps, for consistency use preCreate and preEdit as well).

    The setData is really there for legacy reasons only - I may consider removing its documentation from future versions (although retaining the event for backwards compatibility in 1.x).

    Allan

  • Maha80Maha80 Posts: 30Questions: 10Answers: 1

    Thx again for your quick help. You are awesome!

This discussion has been closed.