Having recently delved into Laravel and Vue, I am eager to develop a site for our Intranet. Pulling data from the Laravel database has been successful, displaying the data works well, and the search functionality is also up and running smoothly. However, I encountered an issue with sorting the table data when a search value is entered. Despite changes in the sort direction, column, and icon being reflected in the dev tools, the search results remain unsorted.
Here is how my index.vue script setup looks:
// Script setup details go here...
The component responsible for loading the data into the table is as follows:
<div class="overflow-x-auto grow pl-6 pr-6">
<DataTable
// DataTable attributes listed here...
/>
</div>
Despite utilizing Vue dev tools and console logging in the handleSort function to pinpoint any errors, everything seems to be functioning properly except for the fact that filteredItems are not returned when the searchFilter is populated.