Skip to content

Commit e332550

Browse files
[6.x] Update itemActions state when switching localization (#13804)
1 parent d8c793e commit e332550

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

resources/js/components/actions/ItemActions.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup>
2-
import { ref, computed, useTemplateRef } from 'vue';
2+
import { ref, computed, useTemplateRef, watch } from 'vue';
33
import useActions from './Actions.js';
44
import ConfirmableAction from './ConfirmableAction.vue';
55
import axios from 'axios';
@@ -20,6 +20,12 @@ const confirmableActions = useTemplateRef('confirmableActions');
2020
const actions = ref(props.actions);
2121
const actionsLoaded = ref(props.actions !== undefined);
2222
23+
watch(
24+
() => props.actions,
25+
() => actions.value = props.actions,
26+
{ deep: true }
27+
);
28+
2329
let preparedActions = computed(() => {
2430
return prepareActions(actions.value, confirmableActions.value);
2531
});

resources/js/components/entries/PublishForm.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,7 @@ export default {
682682
this.collection = data.collection;
683683
this.title = data.editing ? data.values.title : this.title;
684684
this.actions = data.actions;
685+
this.itemActions = data.itemActions;
685686
this.fieldset = data.blueprint;
686687
this.permalink = data.permalink;
687688
this.site = localization.handle;

0 commit comments

Comments
 (0)