Closed manik005 closed 7 years ago
Sorry for the trouble. There was some problem with me ref, just now figured it out. Is there any other method we can access child components ?
Hi @manik005
Thank you for the feedback. I hope you continue to find the framework useful.
I'm not sure I understand your question correctly. Are you wanting to access child components from the parent datatable or are you wanting to call methods on the datatable from some other component?
Thanks Andrew
Actually 'm trying both.
On Tue 28 Feb, 2017, 5:08 AM Andrew Courtice, notifications@github.com wrote:
Hi @manik005 https://github.com/manik005
Thank you for the feedback. I hope you continue to find the framework useful.
I'm not sure I understand your question correctly. Are you wanting to access child components from the parent datatable or are you wanting to call methods on the datatable from some other component?
Thanks Andrew
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/andrewcourtice/vuetiful/issues/6#issuecomment-282893618, or mute the thread https://github.com/notifications/unsubscribe-auth/AAn_tuWjPivJZSBO0KCW39LE9KR0PJunks5rg16LgaJpZM4ML_QC .
hi @andrewcourtice , thank you for creating a wonderful pluign. It is really appreciated. I was wondering, can I specify a default grouping when initializing a table? I would like to initialize a table with 2 level grouping. I tried using the grouping-column-ids option but it is not working. I'm I doing this wrong?
hey @yosokus ,
I tried something similar to this initially. What I did was first gave a ref
to the datatable and then passed the index of column to be grouped to the groupColumn
method of datatable. Have mentioned the code snippet below
this.$refs.refOfDatatable.groupColumn(this.columns[indexOfColumnToBeGrouped]);
ps: 'm newbie to vuejs so 'm not really sure if this is a correct but it works.
@manik005 thanks. I'll try it. I'm also a newbie to vue.js, so who am I to judge
Hi @yosokus
Firstly, thank you for your feedback. I appreciate it.
The code snippet @manik005 has provided above is correct. Just create a reference to the datatable
component and then you can call the groupColumn
and degroupColumn
functions respectively to add the column to the grouping stack or remove that column from the grouping stack.
Hi Andrew, First I would like to appreciate you for the great work so far. I was just trying to play with it and decided to have grouping functionality externally. ie group based on the toggle component's state. I was trying to access the
groupColumn
method from the parent instance but not sure why it is getting triggerd. What would be the best way to acheive it ?