mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
* fix: keep a button action card open when its save finishes A created action is keyed by its new id once the list is refetched, which closed the card while the context was still on screen. * fix: give the button action error a line height * fix: outline the selected button field cell * fix: name the button actions that ran before one failed Completed actions are not rolled back, and the old message left the clicker to assume nothing had happened. * fix: disable a button field for users who may not click it The dispatch operation is now scoped to the field, which is the only id a cell has to ask with. Roles attach no lower than the table, so one check on the field answers the same as one per action. * fix: refetch permissions when a field is created or restored A role on the table or database lists the fields it covers, so a field added after the page loaded was refused by every field scoped check until a reload. * test: cover the disabled button in the row modal and on a card * fix: keep a button action card in place while its save finishes The refetched list keyed a created or retyped action by its new id, so its card remounted and the editor scrolled to the top mid-save.
50 lines
1.2 KiB
Vue
50 lines
1.2 KiB
Vue
<template>
|
|
<div class="control__elements">
|
|
<span
|
|
v-if="requiresReconfiguration"
|
|
v-tooltip="$t('buttonField.requiresReconfiguration')"
|
|
>
|
|
<Button
|
|
size="tiny"
|
|
type="secondary"
|
|
icon="iconoir-warning-triangle"
|
|
disabled
|
|
>
|
|
{{ field.label }}
|
|
</Button>
|
|
</span>
|
|
<span
|
|
v-else-if="canClick"
|
|
v-tooltip="
|
|
rowIsCreated ? null : $t('rowEditFieldButtonField.createRowBefore')
|
|
"
|
|
>
|
|
<!-- The row create modal renders every field before the row exists. -->
|
|
<Button
|
|
size="tiny"
|
|
type="secondary"
|
|
:loading="dispatching"
|
|
:disabled="!rowIsCreated"
|
|
@click="dispatchWorkflowActions"
|
|
>
|
|
{{ field.label }}
|
|
</Button>
|
|
</span>
|
|
<span v-else v-tooltip="disabledReason">
|
|
<Button size="tiny" type="secondary" disabled>
|
|
{{ field.label }}
|
|
</Button>
|
|
</span>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import rowEditField from '@baserow/modules/database/mixins/rowEditField'
|
|
import buttonField from '@baserow/modules/database/mixins/buttonField'
|
|
|
|
export default {
|
|
name: 'RowEditFieldButtonField',
|
|
mixins: [rowEditField, buttonField],
|
|
}
|
|
</script>
|