Replies: 8 comments
-
You can do it by finding the export plugin via |
Beta Was this translation helpful? Give feedback.
-
Hello! I'm trying this but I'm getting an error with revoEl.getPlugins() because it says that Export works fine but I can't do yarn build because of that error / warning, any suggestions or fix? |
Beta Was this translation helpful? Give feedback.
-
Hey @DavidCF98 you can cast it to the correct type: (revoEl as HTMLRevoGridElement).getPlugins(); |
Beta Was this translation helpful? Give feedback.
-
Sorry to bother you again. Now it tells me: Cannot find name 'HTMLRevoGridElement'... Am I doing something wrong? Thanks again! |
Beta Was this translation helpful? Give feedback.
-
No problem! (revoEl as any).getPlugins(); |
Beta Was this translation helpful? Give feedback.
-
Now it works fine! Thank you so much for help! 👍 |
Beta Was this translation helpful? Give feedback.
-
instead of export default {
// Rest of code goes here...
async mounted() {
const grid = document.querySelector('revo-grid') as HTMLRevoGridElement
this.exportPlugin = (await grid.getPlugins()).find((plugin) => 'exportFile' in plugin)
},
// Rest of code goes here...
} or declare an async function inside of export default {
// Rest of code goes here...
mounted() {
const getExportPlugin = async () => {
const grid = document.querySelector('revo-grid') as HTMLRevoGridElement
this.exportPlugin = (await grid.getPlugins()).find((plugin) => 'exportFile' in plugin)
}
getExportPlugin()
},
// Rest of code goes here...
} No need for Additionally, ESLint says that the globally declared type doesn't exist, so here's a hack - add the following line on top of the script: /* global HTMLRevoGridElement:readonly */ |
Beta Was this translation helpful? Give feedback.
-
This works ok in v4 |
Beta Was this translation helpful? Give feedback.
-
I have attempted to look at the docs and find a way to export to csv.
I am using Vue CLI and "@revolist/vue3-datagrid": "^3.0.97".
I can see no way to implement "exporting="true"" when using <vgrid .... />
Is there a way to do this? or is it not supported?
Beta Was this translation helpful? Give feedback.
All reactions