How do you only rebuild the searchpane for the column you are editing?

How do you only rebuild the searchpane for the column you are editing?

pybcgpybcg Posts: 29Questions: 8Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem: I am using the Editor and when I make an edit to a cell, I see that searchpanes gets rebuilt and it takes a very long time. How and where do I specify to rebuild? I know we're asked to do searchPanes.rebuildPane, but it's not clear WHEN you're supposed to run this. So far, I tried it at the Editor 'postEdit' event, but that's not working.

Answers

  • pybcgpybcg Posts: 29Questions: 8Answers: 0

    In the editor code, I noticed the following:

    dt.searchPanes.rebuildPane(undefined, true)

    This is a killer - I think this is redundant because I swear it's getting rebuilt somewhere else. I commented this out and now I'm good to go.

  • colincolin Posts: 9,791Questions: 0Answers: 1,620

    Yep, if you're using Editor the panes will be rebuilt automatically - see example here - so you shouldn't need to do anything yourself.

    Colin

  • pybcgpybcg Posts: 29Questions: 8Answers: 0

    My questions were very confusing. Let me reask:

    You are correct in saying that the panes are being built automatically. unfortunately, i have tons of searchpanes and to refresh all searchpanes after each edit is very expensive. is there no way to turn this off? i had to comment out dt.searchPanes.rebuildPane(undefined, true) in the Editor code to prevent a global refresh, and I'm only rebuilding panes that are editor columns. I guess my question is why would EVERY searchpane get rebuilt when making edits? I have a table that has 5 editable columns and 20 uneditable columns and those uneditable columns should not have to rebuild.

  • sandysandy Posts: 329Questions: 0Answers: 97

    Hi @pybcg ,

    Could you give me the line number for that call and I will take a closer look. A lot of the time the rebuilds are called to allow searchPanes.cascadePanes and searchPanes.viewTotal to operate. Are you using either of those? If not it may be possible for us to make an optimisation of some kind.

    Thanks,
    Sandy

Sign In or Register to comment.