Meu está bugando.

Meu está bugando.

DumbleDWDumbleDW Posts: 15Questions: 2Answers: 0
edited April 2022 in Free community support

Boa tarde, poderiam me ajudar em uma questão o meu <th></th> está bugando com a tabela dentro de um modal, segue o print:

E quando clico no filtro por organizar por ordem alfabética ele retorna normal, segue o print:

Replies

  • kthorngrenkthorngren Posts: 20,302Questions: 26Answers: 4,769

    Is the table hidden when Datatables initializes? If so use columns.adjust() to fix the column widths when the table becomes visible, like this example. If you still need help please post a link to your page or a test case replicating the issue so we can help debug.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • DumbleDWDumbleDW Posts: 15Questions: 2Answers: 0

    A tabela fica escondida em um modal e o modal e chamado por um <a class="btn" data-toggle='modal'>, o exemplo acima se aplica para um modal também?

  • DumbleDWDumbleDW Posts: 15Questions: 2Answers: 0

    Segue como está o código: http://live.datatables.net/yaluvuyo/1/edit

  • kthorngrenkthorngren Posts: 20,302Questions: 26Answers: 4,769

    Your test case doesn't run. Look at the browser's console for errors. You removed the default JS libraries (jquery.js and datatables.js) causing the errors. The example states this:

    The reason this requires special consideration is that when the DataTable is initialised in a hidden element the browser doesn't have any measurements with which to give the DataTable, and this will result in the misalignment of columns when scrolling is enabled.

    If the table is in a hidden tab, modal or hidden container when initialized the columns.adjust() will need to be used once the table is. shown. If you still need help please update the test case so it runs and replicates the problem.

    Kevin

  • DumbleDWDumbleDW Posts: 15Questions: 2Answers: 0

    Consegui arrumar o ajuste usando o columns.adjust() mas me tira uma dúvida ele ainda fica com um delay de 1 segundo para ajustar, teria como retirar esse delay?

  • kthorngrenkthorngren Posts: 20,302Questions: 26Answers: 4,769

    Translated:

    I managed to adjust or adjust using or columns.adjust() but I get a doubt that it still has a delay of 1 second to adjust, would you like to remove this delay?

    I'm not sure what you mean by 1 second. Do you have an updated running test case that shows what you are trying to do so we can help?

    Kevin

  • DumbleDWDumbleDW Posts: 15Questions: 2Answers: 0

    Deu certo aqui, consegui arrumar, muito obrigado pelo apoio novamente.

Sign In or Register to comment.