-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
3.1.4, 3.2.2
-
None
-
MOODLE_31_STABLE, MOODLE_32_STABLE
Can we show the first row expanded on the responsive tables, so people can immediately see the extra info is available on all tabs that use responsive tables. By default all of the rows have the columns that don't fit on a small screen hidden and the plus icon that shows them isn't immediately obvious.
It's not clear to students or staff that there are more columns to be shown when viewing the report on a mobile device.The tabs affected are: overview, feedback comments, personal tutor dashboard.
I know it was possible through a small config change on Foo Tables to have the first row load in expanded view, with all the subsequent rows loading minimised.
Seems possible in Data Tables with this code:
$( 'td:first-child', table.row( ... ).node() ).trigger( 'click' );
or this code:
var rowIndex = 2;
var targetRow = 'tr:nth-child(' + rowIndex + ')';
$('#tabella1 ' + targetRow + ' td:first-child').trigger('click');
See: https://datatables.net/forums/discussion/29123/expand-a-specific-row#Comment_78395