vue-virtual-scroller icon indicating copy to clipboard operation
vue-virtual-scroller copied to clipboard

accessor function for key-field

Open neznayer opened this issue 2 years ago • 0 comments
trafficstars

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

  • [X] Read the docs.
  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

neznayer avatar Feb 21 '23 02:02 neznayer