Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Console error if datagrid no longer present #74

Open
kingy04 opened this issue Apr 18, 2018 · 6 comments
Open

Console error if datagrid no longer present #74

kingy04 opened this issue Apr 18, 2018 · 6 comments
Labels

Comments

@kingy04
Copy link
Contributor

kingy04 commented Apr 18, 2018

When using the datagrid in a sidebar or modal a console error can occur when using this component as when the refresh method is called the datagrid is no longer present.

We could check if this.$refs.vuetable.$el exists before calling this code to prevent this? @BrockReece?

this.$refs.vuetable.refresh()

@kingy04 kingy04 added the bug label Apr 18, 2018
@BrockReece
Copy link
Collaborator

What is the error? Is it that this.$refs.vuetable doesn't exit?

@kingy04
Copy link
Contributor Author

kingy04 commented Apr 18, 2018

Uncaught TypeError: Cannot read property 'refresh' of undefined

@BrockReece
Copy link
Collaborator

BrockReece commented Apr 18, 2018

Yep, checking if this.$refs.vuetable exists first makes sense.

I think checking for this.$refs.vuetable.$el will throw the same error as it is undefined

@BrockReece
Copy link
Collaborator

Can you give me some steps to reproduce this issue so I can test the PR?

@kingy04
Copy link
Contributor Author

kingy04 commented Apr 18, 2018

if you add a file to open the sidebar, and click finish, you should see a console error when the sidebar closes.

@BrockReece
Copy link
Collaborator

Ok, I tried this but I am getting an error when uploading a file on my local dev env, looks to be building the url incorrectly.
https://github.com/CroudTech/cc-vuejs-monorepo/issues/130

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants