andrewcourtice / vuetiful

Vuetiful is a component framework written on top of the Vue reactive library. It is primarily designed for creating business/administration applications where the displaying of data is paramount.
MIT License
488 stars 108 forks source link

Accessing filtered rows from parent #28

Open bobby-nicholas opened 7 years ago

bobby-nicholas commented 7 years ago

Hey @andrewcourtice, thanks for all the nice work with these components.

I needed to access the currently filtered rows from the datatable component in my in-page vue app. To do this, I had the computed function rows() emit an event ('rowchange') with the rows array as its parameter. When I tested this with your example application in dev (having a function handle the v-on:rowchange event) this worked nicely. However, when I compiled the code and tried this in my app, the event does not seem to be firing.

I'm still pretty new to vue, so maybe there is something about event handling I am missing? Is there anything special I have to account for when using the component with an in-page vue instance, versus a vue file? If you don't have an answer off hand, do you have any suggestions for another way to expose the filtered row data to the parent?

Thanks again!