Responsive Extension Leaving visible property set to TRUE

Responsive Extension Leaving visible property set to TRUE

zepernickzepernick Posts: 32Questions: 7Answers: 0

I have a plugin that creates column search boxes in the header and looks at the column.visible property to determine if a search box needs to be created above the column. It appears that this property is still TRUE after upgrading to 1.10.10 with the new responsive extension, and my plugin ends up creating a search box for a column that does not exist. Was this an intentional modification, or is it a bug?

This question has an accepted answers - jump to answer

Answers

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

    Responsive 2 no longer uses DataTables' column visibility API (that was the number 1 issue with Responsive 1.x - the fact that you couldn't set your own column visibility at the same time as using Responsive).

    So this probably is a result of that change (and which is why it is a 2.x release since some code might need to change).

    You say the column doesn't exist - but if it is hidden by Responsive then it does exist it is just hidden and could be shown in future. Do your input boxes update to reflect which columns are visible or not?

    Regards,
    Allan

  • zepernickzepernick Posts: 32Questions: 7Answers: 0
    edited November 2015

    Thanks,that helps clear it up, and makes sense as to why it should have been changed. I am working on trying to get my plugin fixed. I will come post back once I get it figured out.

    My input boxes ARE reflecting the columns that are visible, but it is pushing out the header by however many columns have been collapsed. What I really need to know is what columns are not currently collapsed.

  • zepernickzepernick Posts: 32Questions: 7Answers: 0

    I had been wanting to release this column searching plugin for sometime so I thought I would share it here.

    https://github.com/zepernick/DataTables-ColumnSearching

    Here is a fiddle of it in action. This also includes the responsive extension so you can see that the search fields drop out of the header as the responsive extension collapses the columns.

    https://jsfiddle.net/zepernick/s7xmz7g3/

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    That's awesome - thank you for sharing it with us!

    Could you possibly add it to the thread here and I'll add it to the first post in that thread (where I'm going to have a list of community provided plug-ins).

    Thanks for the PR btw - I'll merge it in tomorrow morning.

    Regards,
    Allan

  • zepernickzepernick Posts: 32Questions: 7Answers: 0

    You're welcome! I added it to the provided thread.

This discussion has been closed.