The Virtual Scroll example in the online documentation for the DataTable component seems to be broken in both PrimeVue 2 and 3:
PrimeVue 2: https://www.primefaces.org/primevue/sho ... ble/scroll
PrimeVue v3: https://www.primefaces.org/primevue/sho ... ble/scroll
The example appears, but no data is being displayed, and only the headers are shown ("Name", "Country", "Representative", "Status").
Apart from this, the DataTable component does appear to work (I'm using it in my own code), so probably just the example needs fixing.
Having said that, the documentation could probably do with a bit of expansion on what the various properties for the DataTable actually do.
I've figured it out from what is shown in the documentation and a bit of playing around, but it would be nice to have them specifically explained.
In particular, I feel like the relationships between the following properties could do with some further explanation:
- rows
- totalRecords
- virtualRowHeight
Code: Select all
[Vue warn]: Error in render: "TypeError: context.props.column.$scopedSlots[context.props.type] is not a function"
vue.runtime.esm.js?2b0e:1888 TypeError: context.props.column.$scopedSlots[context.props.type] is not a function
at render (ColumnSlot.vue?62a0:23)
at options.render (index.js?6435:83)
In case it helps anyone else, this is what I am talking about:
Code: Select all
<Column
header="Things"
>
<template #loading>
<span class="loading-text">
THIS WILL BE DISPLAYED DURING VIRTUAL SCROLL
AND YOU *MUST* HAVE IT OR YOU WILL GET AN
ERROR WHEN THE TABLE IS INITIALIZED
</span>
</template>
<template #body="slotProps">
{{ slotProps.data.name }}
</template>
</Column>
Andrew