linmasahiro / vue3-table-lite

A simple and lightweight data table component for Vue.js 3. Features sorting, paging, row check, dynamic data rendering, supported TypeScript, and more.
https://vue3-lite-table.vercel.app/
MIT License
248 stars 73 forks source link

Expanding rowClicked for columnClicked and cellClicked #110

Closed Boardtale closed 8 months ago

Boardtale commented 8 months ago

I'm trying to figure out now what cell user clicked. I need to popup some more specific data for specific cell once user click it. It's missing unfortunatly in this library.

linmasahiro commented 8 months ago

I'm trying to figure out now what cell user clicked. I need to popup some more specific data for specific cell once user click it. It's missing unfortunatly in this library.

Reference the example please https://github.com/linmasahiro/vue3-table-lite/blob/master/src/examples/RowClicked.vue

Boardtale commented 8 months ago

@linmasahiro Thanks for fast response. not sure, but I often don't see obvious. There's only row clicked. There's also button slot, yes. But I don't see how - on row clicked - can I get - what column was clicked along it

Boardtale commented 8 months ago

Oh, have you suggested using 'tableLoadingFinish' to add it manually to each cell?

linmasahiro commented 8 months ago

If your mean's click any cell and show the cell's data, you can use V-slot mode to implement it, I am wrote a simple example, hope helpful you. Link

Boardtale commented 8 months ago

Yeah, thanks! With slots, it could work, but I have dynamic columns. btw I was trying to checkout primevue dataset.. I have to be honest. I have table with like 100x100 rows and it can change dynamically. Your table has no problem at all, insta changes

While dataset from primevue locks my browser for 1 second and browser stops responding for that time

glad I found your implementation :)

I think I will try to do something with tableLoadingFinish :) and attach events there. If that won't kill performance ;P