getCellValue in QTable @request #17106
Replies: 2 comments
-
If you try to access
It can be called as // column definition that you defined in the columns prop
const col = {
field: (row) => row.foo.bar,
format: (value) => value.toFixed(2),
}
const row = {
foo: {
bar: 15.2345
}
}
getCellValue(col, row) // => '15.23' Here is the source code of quasar/ui/src/components/table/QTable.js Lines 528 to 531 in dbb5148
Yes, and that's why you shouldn't emit |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot! Much clearer. Is there a user interaction that natively triggers an update of
No, I observed that I guess that's because my Or maybe another part of this is that the built-in |
Beta Was this translation helpful? Give feedback.
-
Hi!
The docs on
@request
event ofq-table
state that the params ofrequestProp
include a required paramgetCellValue
. The index.d.ts file does not give it a question mark as an optional parameter, so it must be required:Two questions:
Here is my working code:
getCellValue
prop? I've searched and did not find anywhere an example of how it was meant to be used.I see that
@request
gets triggered when any pagination button is pressed and includes an updatedpagination
object. Also,@request
gets emitted when a filter is pressed (as long asv-model
on:filter
is configured) with an updatedfilter
object.I did not find such use cases for the
getCellValue
prop.Note: There is a relevant discussion on Q-table server requests, but it does not encompass any of my Qs above.
Beta Was this translation helpful? Give feedback.
All reactions