plugin method set is called for all plugin instances when one cell is opened for editing. Why ?

plugin method set is called for all plugin instances when one cell is opened for editing. Why ?

nampordnampord Posts: 5Questions: 3Answers: 0
edited September 2018 in Free community support

I have a table with inline editing and I am using the select2 plugin for four columns.
Now when I click on one of the select2 cells, I see that the set function for all four select2 controls is called.
This is really not ideal, since my select2 is initialized via an server call. and I would like to do this only when the actual cell is opened.
Is this the expected behavior ? Or am i doing something wrong here.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,457Questions: 1Answers: 10,466 Site admin
    Answer ✓

    That is expected since Editor will set itself up for editing the whole row by default, even if inline editing is being used (to allow for the API to be used to modify other values in the form).

    If you don't want that behaviour and just want a single value to be used for editing, there is a scope option in form-options which can be set to be cell.

    Allan

  • nampordnampord Posts: 5Questions: 3Answers: 0

    Thanks Allan, I very much appreciate your patience with people who have not (yet) read all of your excellent documentation!

  • allanallan Posts: 63,457Questions: 1Answers: 10,466 Site admin

    To be honest, there is so much of it, I forget bits now and then myself. Can't realistically expect everyone to have a detailed knowledge of the software :).

    Thanks for the compliment on the docs though!

    Allan

This discussion has been closed.