Akryum / vue-virtual-scroller

⚡️ Blazing fast scrolling for any amount of data
https://vue-virtual-scroller-demo.netlify.app
9.43k stars 901 forks source link

accessor function for key-field #792

Open neznayer opened 1 year ago

neznayer commented 1 year ago

Clear and concise description of the problem

We have data which for few reasons has all of its field in arrays like this:

[
  {
    "id": ["12345"],
    "users": ["Anton", "John"]
  },
....
]

Currently I didn't find a solution of how to make the key-field see the id.

Suggested solution

It would be great if the key-field would accept the accessor function, telling how to get the key from a row of data, like this:

 <RecycleScroller
           ...
          :key-field="entry => entry.id[0]"
        >

Alternative

No response

Additional context

No response

Validations