This is required as otherwise the action has no information on which user it was called
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
:actions="userActions"
:disabled="isLoadingField"
:edit="editing"
+ :user="user"
@update:edit="toggleEdit" />
</td>
</tr>
:disabled="disabled"
:aria-label="text"
:icon="icon"
- @click="action">
+ @click="(event) => action(event, { ...user })">
{{ text }}
</NcActionButton>
</NcActions>
import SvgPencil from '@mdi/svg/svg/pencil.svg?raw'
interface UserAction {
- action: (event: MouseEvent) => void,
+ action: (event: MouseEvent, user: Record<string, unknown>) => void,
icon: string,
text: string
}
type: Boolean,
required: true,
},
+
+ /**
+ * Target of this actions
+ */
+ user: {
+ type: Object,
+ required: true,
+ },
},
computed: {