Skip to content

Commit

Permalink
Changed default page size to 25 + added link to task
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick11514 committed Oct 9, 2024
1 parent 9a4086d commit 6216866
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions frontend/src/Teacher/AllTasks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type Task = {
title: string;
subject: string;
date: Date;
link: string;
};
type RawTask = Omit<Task, 'date'> & {
Expand Down Expand Up @@ -109,9 +110,10 @@ const columns = [
},
{
title: 'Title',
data: 'title',
data: (row: Task) => row,
orderable: true,
searchable: true
searchable: true,
render: (data: Task) => `<a href="${data.link}" target="_blank">${data.title}</a>`
},
{
title: 'Subject',
Expand Down Expand Up @@ -174,7 +176,8 @@ const options = {
callback({ data: items, recordsTotal: count, recordsFiltered: count }); // https://datatables.net/manual/server-side#Returned-data
},
orderMulti: false
orderMulti: false,
pageLength: 25
} satisfies Config;
//save ref to data table and if it changes save datatable instance to table variable
Expand Down

0 comments on commit 6216866

Please sign in to comment.