Buttons icon indicating copy to clipboard operation
Buttons copied to clipboard

Fix prefix/postfix buttons disappearing when colReorder is also used

Open demetris-manikas opened this issue 3 years ago • 3 comments

Hi.

I use both the colVis and colReorder plugins and I noticed that if a column has been moved then all prefix/postfix buttons that I have defined along with the colvis button vanish.

Here is the definition I use

var button = {
        extend: 'colvis',
        text: 'Reset',
        columns: ':not(.colvis-ignore)',
        postfixButtons: [
            {
               extend: 'colvisRestore',
            }
        ]
    }

This PR addresses this issue. Please let me know whether I should setup a showcase for this. Thanks a lot for your time.

demetris-manikas avatar Jan 27 '22 22:01 demetris-manikas

Many thanks for this! I'll review it properly before the next Buttons release. Are you happy for this to be included under the MIT license?

AllanJard avatar Feb 01 '22 10:02 AllanJard

Yes of course I am.

demetris-manikas avatar Feb 01 '22 20:02 demetris-manikas

I have also created an almost identical to colVis extension (renames mostly) for manipulating the searchable property. Would you be interested in that as well?

demetris-manikas avatar Feb 02 '22 09:02 demetris-manikas