Last active
October 11, 2023 21:32
-
-
Save techjewel/7f994b08909e2cb0e64f41b0019cb06d to your computer and use it in GitHub Desktop.
Ninja Tables Custom JS Snippets for many functionalities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// By default ninja tables keeps open each row for expanding | |
// You can add the following js then it will keep expanded one row at a time | |
var currentExpandRow = false; | |
$table.on('expanded.ft.row', function (e, ft, selfArg) { | |
if(currentExpandRow == selfArg) { | |
return; | |
} | |
currentExpandRow = selfArg; | |
ft.rows.collapse(); | |
selfArg.expand(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment