Column-Filter with FixedColumns and ScrollResize

Column-Filter with FixedColumns and ScrollResize

maik84maik84 Posts: 2Questions: 1Answers: 0
edited January 2020 in Free community support

Hello,
i have a table that uses fixed column, scrollResize and individual column filters.
My problem is, that if i enter a value into the input of the fixed column (column #1), the search is triggered once i typed the first letter and the input field gets cleared.
After a lot of testing i found out, that this issue is caused by the option "scrollResize: true", which activates the ScrollResize-Plugin.

Any idea how i can solve this?

http://live.datatables.net/fologejo/3/edit

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,055 Site admin

    I'm afraid I don't have an immediate solution for you here. It looks like the issue is related to the cloned elements for the FixedColumn being redrawn. Indeed, if you filter on any column other than the fixed one, it works no problem.

    What might need to happen here is that FixedColumns gets an upgrade to be a bit smarter about how it clones input elements - it should perhaps read the value property (not attribute) and write that into the cloned element. I've created an issue for that (DD-1334 in our internal issue tracker) to see it done for the next release of FixedColumns.

    Allan

  • maik84maik84 Posts: 2Questions: 1Answers: 0

    Thanks for the quick reply. I will wait for an update than.

    I also tried to use select-filter and select2-filter elements, which works fine with fixedColumns enabled. But as soon as the scrollResize gets activated the unwanted behaviour starts there as well.

  • ssoucyssoucy Posts: 1Questions: 0Answers: 0

    Experienced the same issue and did lot of testing to find out the same error, before seeing that post.

    I found an interesting line in scrollResize.js (line 117)

            if ( dt.fixedColumns ) {
                dt.fixedColumns().relayout();
            }
    

    So I commented out that line and for me the behaviour with the line commented is much more acceptable that what happens when I try to use the column-filter.

    The only effect that is causing, is that stick columns footer/header does not follow the screen resize. But for me I can live with that.

This discussion has been closed.