We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d27531 commit 97fe831Copy full SHA for 97fe831
src/components/table/QwikTable.jsx
@@ -55,6 +55,7 @@ export const QwikTable = component$((props) => {
55
sortOrder: sortOrder,
56
totalPosts: totalPosts,
57
prevSearch: prevSearch,
58
+ searchInp: searchInp,
59
searchBy: searchBy
60
}))
61
src/utils/sortData.js
@@ -7,6 +7,7 @@ export function sortData({
7
sortOrder,
8
totalPosts,
9
prevSearch,
10
+ searchInp,
11
searchBy
12
}
13
@@ -23,7 +24,7 @@ export function sortData({
23
24
) {
25
const initialSearchKey = searchBy.value;
26
- if (tableData.length === 0) tableData = data;
27
+ if (tableData.length === 0 || searchInp.value === '') tableData = data;
28
29
totalPosts.value = tableData.length;
30
0 commit comments