';
+ ;
// Append the new row to the table
$('.table').DataTable().destroy();
-
+
$('.table tbody').append(newRow);
-
+
$('.table').DataTable();
});
});
@@ -220,7 +224,18 @@ var newRow = '
' +
});
+ $(document).ready(function () {
+ // Iterate over each div with the form-control class
+ $('.form-control').each(function () {
+ // Get the text content of the div
+ var text = $(this).val();
+ // Set the height of the div to fit the text content
+ $(this).height('auto'); // Reset the height to auto
+ var contentHeight = $(this).prop('scrollHeight');
+ $(this).height(contentHeight);
+ });
+ });