After coming across this specific example online, I attempted to implement it myself. Unfortunately, the modal feature does not seem to be functioning as expected. Interestingly, when testing it on jsfiddle, everything works perfectly.
Further investigation led me to discover that the "Collapsed" class is not being assigned to the table, which prevents the desired functionality from taking place.
I am puzzled as to why the class is not being applied to the table. Any insights on this matter would be greatly appreciated.