waningflow / vue-virtual-table

vue table component of vue2
https://npmjs.com/vue-virtual-table
MIT License
105 stars 45 forks source link

Added support for nested properties #11 #18

Closed nockstarr closed 3 years ago

nockstarr commented 3 years ago

Found my self needing support for nested properties so here is the code if you are interested.

Added method getDescendantProp(obj, path).
The method getDescendantProp is applied were applicable in vue-virtual-table.vue.

Executed build
Bumped package version

Example method usage:

// Access user.name
this.getDescendantProp({user: {name: "userName", age: 43}},  "user.name")
>> userName
// Access user.age
this.getDescendantProp({user: {name: "userName", age: 43}},  "user.age")
>> 43
waningflow commented 3 years ago

I will publish the new version later.

waningflow commented 3 years ago

Do you have skype or slack? We can communicate more conveniently.

nockstarr commented 3 years ago

No, sorry