PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | src/QuickEdit/state/store.js +6 -1 3.1.13.2.1 View file →
@@ -1,4 +1,5 @@
1 +import { useEditModeStore } from '@quick-edit/state/edit-mode';
1 2 import { create } from 'zustand';
2 3
3 4 export const useQuickEditStore = create((set, get) => ({
4 5 hovered: null,
@@ -27,9 +28,13 @@
27 28 setHovered: (target) => set({ hovered: target }),
28 29 setSelected: (target) => set({ selected: target, dirty: {}, error: null }),
29 30 clearSelected: () => set({ selected: null, dirty: {}, error: null }),
30 31
31 - setAgentBlock: (agentBlock) => set({ agentBlock, agentBlockCode: null }),
32 + setAgentBlock: (agentBlock) => {
33 + // A staged block is invisible without the selection UI.
34 + if (agentBlock) useEditModeStore.getState().setOn(true);
35 + set({ agentBlock, agentBlockCode: null });
36 + },
32 37 setAgentBlockCode: (agentBlockCode) => set({ agentBlockCode }),
33 38
34 39 setCommittedSelection: (committedSelection) => set({ committedSelection }),
35 40