Skip to content

Using stickyTableHeaders with bootstable.js #21

Description

@peter450

stickyTableHeaders is very useful for tables with a lot of rows. There is, however, a problem when using it with bootstable.js: when you add a new line, it is twice long as expected. This comes from stickyTableHeaders which doubles the first header row.
The solution is simple, just add a single line to the rowAddNew( ) function in bootstable.js:
if ($(this).attr('name')=='buttons') {
//Es columna de botones
htmlDat = htmlDat + colEdicHtml; //aggregate botones
return false;// <=Add this line to break the loop, this does not interfere with the script even if we do not use stickyTableHeaders
} else {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions