mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
fix(settings): Pass user object to user row actions
This is required as otherwise the action has no information on which user it was called Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
1acc7c0468
commit
a106b7b7be
2 changed files with 11 additions and 2 deletions
|
|
@ -288,6 +288,7 @@
|
|||
:actions="userActions"
|
||||
:disabled="isLoadingField"
|
||||
:edit="editing"
|
||||
:user="user"
|
||||
@update:edit="toggleEdit" />
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
:disabled="disabled"
|
||||
:aria-label="text"
|
||||
:icon="icon"
|
||||
@click="action">
|
||||
@click="(event) => action(event, { ...user })">
|
||||
{{ text }}
|
||||
</NcActionButton>
|
||||
</NcActions>
|
||||
|
|
@ -54,7 +54,7 @@ import SvgCheck from '@mdi/svg/svg/check.svg?raw'
|
|||
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
|
||||
}
|
||||
|
|
@ -90,6 +90,14 @@ export default defineComponent({
|
|||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
|
||||
/**
|
||||
* Target of this actions
|
||||
*/
|
||||
user: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue