• Resolved norouzi1983

    (@norouzi1983)


    Hello,

    I’ve used “DataTables ColumnFilterWidgets Extension 1.7” to filter some columns of my table. My table’s direction is right to left because site page is Persian. But field drop down are sorted from left and left most drop down relates to right most column. So order or drop downs need to be flipped and sorted from right to left. Could you please help me on this?

    Thank you

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    The easiest solution should be to add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .column-filter-widget {
        float: right;
    }

    Regards,
    Tobias

    Thread Starter norouzi1983

    (@norouzi1983)

    Hi Tobias,

    Thanks for your quick reply. It worked fine.
    How can I place each dropdown on top of related column?

    And I want to know how to increase size of each dropdown’s length. Now the size isn’t big enough and as you see some of characters are merged in each field.

    Thank you,
    Ali

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    unfortunately, I don’t really know a solution to this, sorry.

    Your best chance might be to extend the CSS code to

    .column-filter-widget {
        float: right;
        width: 13.5%;
        margin-left: 5px;
    }

    Regards,
    Tobias

    Thread Starter norouzi1983

    (@norouzi1983)

    Hi Tobias,

    Thanks it worked well.

    Is it possible to change sorting method of values in dropdown list? As you can see on my page now the numbers in each dropdown isn’t sorted based on value.

    Regards,
    Ali

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no, sorry, the dropdowns only support number sorting, but your table cells are text. Unfortunately, the order can therefore not be changed.

    Regards,
    Tobias

    Thread Starter norouzi1983

    (@norouzi1983)

    Hi Tobias,

    I changed my excel file’s cell properties to Number and re-imported it to TablePress. Sorting is still same.

    I also added a new table and entered some numbers manually. You can see it in same page below first table. Although all cells are numbers but sorting is same.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    hhm, that’s weird. Unfortunately, I have no idea why this happens, as I’m not the developer of the ColumnFilterWidgets JavaScript code, sorry.

    Regards,
    Tobias

    Thread Starter norouzi1983

    (@norouzi1983)

    Hi,

    I think in below snippet of JavaScript it changes all fields to text before sorting.

    function fnSort( a, b ) {
    var a_text = $( a ).text(),
    b_text = $( b ).text();

    if ( widget.hasOwnProperty( ‘fnSort’ ) ) {
    return widget.fnSort( a_text, b_text );

    Many thanks for your support.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    yes, it looks like this has something to do with it. Maybe you can try testing to change this.

    Best wishes,
    Tobias

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘DataTables Filter Dropdown Direction’ is closed to new replies.