initComplete for Searchpanes?

initComplete for Searchpanes?

Pete44Pete44 Posts: 22Questions: 7Answers: 0

Is there an in-build possibility to run specific code after the searchpanes extension is fully initiated? I couldn't find anything related in the docs. I think it would be helpful to has an option like initComplete on datatables.

A suggestion for a workaround would be nice also. I'm not sure how I can handle to find out when searchpanes extension loading is complete.

This question has accepted answers - jump to:

Answers

  • kthorngrenkthorngren Posts: 21,210Questions: 26Answers: 4,928
    Answer ✓

    See if the searchPanes.dtOpts option does what you want.

    Kevin

  • Pete44Pete44 Posts: 22Questions: 7Answers: 0

    Awesome. That's it! Didn't know that I can use all options known from datatables within dtOpts. Thanks a lot @kthorngren.

    Is it intended that the initComplete fires everytime a single search pane is created? If I'm using 4 panes, it will be 4 times executed. Or is there a possibility to execute only one time on last pane is created (full pane container will be created)?

    You can see it on this example: http://live.datatables.net/yuxomace/5/edit (search in the console log for fired)

  • kthorngrenkthorngren Posts: 21,210Questions: 26Answers: 4,928
    Answer ✓

    In that case I think you will need to use columns.searchPanes.dtOpts for the specific column you want to run initComplete on.

    Kevin

  • Pete44Pete44 Posts: 22Questions: 7Answers: 0

    Yep, that's it. Now it's only executed on my last column a single time and it works great. Thank you for your fast replies and your help. :)

This discussion has been closed.