QTable Computed Props #17857
Answered
by
rstoenescu
gt1202
asked this question in
General - Components / Directives / etc
QTable Computed Props
#17857
-
I'm trying to get a list of filtered records from a table so that I can get the sum of those records. I've looked at filteredSortedRows and computedRows, but can't see how to use them. I tried to create a filter-method and function: <q-table
:filter="filter"
:filter-method="getFilter"
/>
<script setup>
const getFilter = (rows, terms, cols, getCellValue) => {
console.log('getFilter');
}
</script> The function is called and displays a line on the console, but then I get an error:
I'd welcome any help. |
Beta Was this translation helpful? Give feedback.
Answered by
rstoenescu
Feb 28, 2025
Replies: 1 comment
-
Hi. Put a ref on your qtable and access the computed props with it. The problem with your filter-method is that you are not returning the required Array of rows. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
rstoenescu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. Put a ref on your qtable and access the computed props with it. The problem with your filter-method is that you are not returning the required Array of rows.