Okay
  Public Ticket #3567808
Missing of features
Closed

Comments

  • Meenakshi Dangi started the conversation

    Option for limit column width and wrap the content is not showing.

    Attached files:  Screenshot 2024-01-23 184249.jpg

  •  1,689
    Miloš replied

    Hello,

    This is because you currently have the "Scrollable" option enabled.

    1842682321.png

    Please check out this Documentation, which explains more details about Table layout and table word wrap.

    The most important part says :

    The “Limit Table Width” option is only shown once the “Scrollable” feature is disabled, and vice-versa. 

    If you don’t see “Limit Table Width”, make sure that the “Scrollable” option is deactivated.


    There is only one custom workaround if you wish to have "horizontal scroll"/scrollable option while being able to set up Custom Column Width ( in that case, word wrap still won't be possible)

    If you wish to try that, here are the steps.

    First, enable "scrollable" in the Display tab, then you can add this custom CSS to the table's customize / Custom CSS tab :

    .wpDataTablesWrapper table.scroll.wpDataTableID-1 {  
      width: max-content !important;   
     table-layout: fixed !important;
    }
    .wpDataTableID-1 th.column-strap { 
        width:300px !important;
    }
    

    You will have to replace the table ID 1 with your table's ID,

    and for the column name, you have to set the "origin header name" of the column, after this part : "th.column-"

    For example, on my test table here,

    3508070018.png

    if i wish to add the custom width in this CSS for the "firstname" column,

    it would be 

    .wpDataTableID-2671 th.column-firstname {   
      width:300px !important;
    }
    1421007837.png

    I hope that helps.

    Let us know if you have any additional questions.

    Thank you.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables