1
0
Fork 0
mirror of synced 2024-06-14 00:14:39 +12:00

Expose static repeater context for row index

This commit is contained in:
Andrew Kingston 2021-11-30 08:47:21 +00:00
parent 2ca6c1d0df
commit 27327ae2a1
2 changed files with 26 additions and 5 deletions

View file

@ -501,9 +501,20 @@
"defaultValue": "M"
}
],
"context": {
"type": "schema"
}
"context": [
{
"type": "schema"
},
{
"type": "static",
"values": [
{
"label": "Row Index",
"key": "index"
}
]
}
]
},
"stackedlist": {
"deprecated": true,
@ -3150,6 +3161,16 @@
}
]
},
{
"type": "static",
"suffix": "repeater",
"values": [
{
"label": "Row Index",
"key": "index"
}
]
},
{
"type": "schema",
"suffix": "repeater"

View file

@ -21,8 +21,8 @@
{#if $component.empty}
<Placeholder />
{:else if rows.length > 0}
{#each rows as row}
<Provider data={row}>
{#each rows as row, index}
<Provider data={{ ...row, index }}>
<slot />
</Provider>
{/each}