Link to test case: https://codepen.io/valdastr/pen/qBmxVWa
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem: Hi, I have a Bootstrap 5 modal and within 'modal-body' I am showing a data table. When the shown data maxes out the height of 'modal-body', I'd like for a scrollbar to appear. Please see codepen - hit the button to show the modal and select to show 100 entries. Modal stretches out to fit the content where I'd like for the table to show scrollbar instead so whole modal is in the viewport. Basically the same as applying 'modal-dialog-scrollable', but only body of the table would scroll.
Now I am aware of the of the 'scrollY' option, but it is kinda limited to be static. One could set 'scrollY: 50vh', but on bigger screen it would not fill whole viewport and on small enough screen it still won't fit probably due 'dataTables_wrapper' having rows with columns that would stack on each other and viewport usage would be incorrect.
Is there any way to achieve the desired result so only body of the table would scroll? I found an example in the forums https://codepen.io/holdencreative/pen/ZYqoMg but it does not work with latest bootstrap/datatables.
Thanks!