Disable truncation of filter labels in searchpanes

Disable truncation of filter labels in searchpanes

timswantimswan Posts: 2Questions: 1Answers: 0

I've done extensive searching to try to figure out how to disable the truncation of the text in searchpanes filter labels, but have had no luck. One option I saw was to add the following to the table initialization, but the text is still truncated, since that appears the be trimmed by the javascript.

initComplete: function(settings, json) {
            $('.dtsp-title, .dtsp-name').each(function() {
                $(this).css({
                    'white-space': 'normal',
                    'word-wrap': 'break-word',
                    'overflow': 'visible',
                    'text-overflow': 'clip'
                });
            });
        },

Has anyone successfully allowed the full filter label to be shown?

Answers

  • kthorngrenkthorngren Posts: 21,289Questions: 26Answers: 4,943
    edited May 29

    I haven't tried that code so not sure if it does what you want but I suspect that SearchPanes might not be completely added to the document when initComplete is executed. If you are using Datatables 2.0 then try that code in the ready() function which, as I understand it, should run after Datatables is complete and SearchPanes iss complete. Or if using a previous version then maybe use setTimeout() with a short timer in initComplete.

    Kevin

  • timswantimswan Posts: 2Questions: 1Answers: 0

    I finally figured out how to disable the truncation of the filter label in the searchpane by using the (possibly deprecated) dataLength: 100 , like so:

            searchPanes:{
                layout: 'columns-1',
                dataLength: 100,
                dtOpts: {
                    scrollY: '126px'
                }
            },
    
Sign In or Register to comment.