mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Only add row on button click
This commit is contained in:
@@ -102,7 +102,7 @@ $escapedPermissions = \array_map(function ($perm) {
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="<?php \count($permissions) + 2 ?>">
|
||||
<button type="button" class="margin-top-small reverse" @click="$dispatch('addrow<?php echo \strtolower($form); ?>')">Add</button>
|
||||
<button type="button" class="margin-top-small reverse" @click="addPermission()">Add Role</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
@@ -32,15 +32,9 @@
|
||||
this.permissions[index] = existing;
|
||||
}
|
||||
});
|
||||
|
||||
this.permissions.push({role: ''});
|
||||
},
|
||||
addPermission(formId, role, permissions) {
|
||||
|
||||
this.permissions.push({
|
||||
role: '',
|
||||
});
|
||||
this.reset();
|
||||
addPermission() {
|
||||
this.permissions.push({ role: '' });
|
||||
},
|
||||
updatePermission(index) {
|
||||
// Because the x-model does not update before the click event,
|
||||
|
||||
Reference in New Issue
Block a user