Skip to content

Commit

Permalink
feat(@cubejs-client/vue): query load event
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilev-alex committed Mar 25, 2021
1 parent a311843 commit 6045e8f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/cubejs-client-vue/src/QueryBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ export default {
builderProps,
},
scopedSlots: this.$scopedSlots,
on: {
queryLoad: (event) => {
this.$emit('queryLoad', event);
}
}
},
children
);
Expand Down
11 changes: 10 additions & 1 deletion packages/cubejs-client-vue/src/QueryRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default {
mutexObj: {},
error: undefined,
resultSet: undefined,
loading: true,
loading: false,
sqlQuery: undefined,
};
},
Expand Down Expand Up @@ -141,6 +141,15 @@ export default {
},
},
watch: {
loading(loading) {
console.log(loading, Date.now())
if (loading === false) {
this.$emit('queryLoad', {
error: this.error,
resultSet: this.resultSet
});
}
},
query: {
deep: true,
handler(query, prevQuery) {
Expand Down

0 comments on commit 6045e8f

Please sign in to comment.