Question: You are asked to add a sorting function to the table in this task. When a column header is first clicked, the table will be

You are asked to add a sorting function to the table in this task. When a column header is first clicked,
the table will be sorted by that column in ascending order. Subsequent clicks will toggle the sorting
order inversely.
 You are asked to add a sorting function to the table

Task 3 - Manipulating Data in Table You are asked to add a sorting function to the table in this task. When a column header is first clicked, the table will be sorted by that column in ascending order. Subsequent clicks will toggle the sorting order inversely. 1. Write a function to sort a 2D array (table rows) by a given key (column). 2. Attach the sort function to the Vue instance. 3. Use v-on: cl ick directive to trigger the sort function. 4. Use v-bind:class directive to append a small arrow (up and down) to the header to indicate the current ordering. The arrow can be made with this CSS trick: https://csstricks.com/snippets/css/css-triangle/. The table is sorted in ascending order by the The table is sorted in descending order by the ID name column. column. Task 3 - Manipulating Data in Table You are asked to add a sorting function to the table in this task. When a column header is first clicked, the table will be sorted by that column in ascending order. Subsequent clicks will toggle the sorting order inversely. 1. Write a function to sort a 2D array (table rows) by a given key (column). 2. Attach the sort function to the Vue instance. 3. Use v-on: cl ick directive to trigger the sort function. 4. Use v-bind:class directive to append a small arrow (up and down) to the header to indicate the current ordering. The arrow can be made with this CSS trick: https://csstricks.com/snippets/css/css-triangle/. The table is sorted in ascending order by the The table is sorted in descending order by the ID name column. column

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!