mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
add actions suggestion for multi-line (#10362)
- on initial load and update of resolver state: create and add actions to suggestin service
This commit is contained in:
parent
68d9f172e3
commit
a73fc45a27
2 changed files with 15 additions and 12 deletions
|
|
@ -106,16 +106,19 @@ useCurrentStateStore.subscribe((state) => {
|
|||
|
||||
handleLowPriorityWork(
|
||||
() => {
|
||||
useResolveStore.getState().actions.addAppSuggestions({
|
||||
queries: state.queries,
|
||||
components: !isPageSwitched ? state.components : {},
|
||||
globals: state.globals,
|
||||
page: state.page,
|
||||
variables: state.variables,
|
||||
client: state.client,
|
||||
server: state.server,
|
||||
constants: state.constants,
|
||||
});
|
||||
useResolveStore.getState().actions.addAppSuggestions(
|
||||
{
|
||||
queries: state.queries,
|
||||
components: !isPageSwitched ? state.components : {},
|
||||
globals: state.globals,
|
||||
page: state.page,
|
||||
variables: state.variables,
|
||||
client: state.client,
|
||||
server: state.server,
|
||||
constants: state.constants,
|
||||
},
|
||||
true
|
||||
);
|
||||
},
|
||||
null,
|
||||
isPageSwitched
|
||||
|
|
|
|||
|
|
@ -102,10 +102,10 @@ export const useResolveStore = create(
|
|||
updateLastUpdatedRefs: (updatedRefs) => {
|
||||
set(() => ({ lastUpdatedRefs: updatedRefs }));
|
||||
},
|
||||
addAppSuggestions: (partialRefState) => {
|
||||
addAppSuggestions: (partialRefState, intialLoad = false) => {
|
||||
if (Object.keys(partialRefState).length === 0) return;
|
||||
|
||||
const { suggestionList, hintsMap, resolvedRefs } = createReferencesLookup(partialRefState);
|
||||
const { suggestionList, hintsMap, resolvedRefs } = createReferencesLookup(partialRefState, false, intialLoad);
|
||||
|
||||
const _hintsMap = get().lookupTable.hints;
|
||||
const resolvedRefsMap = get().lookupTable.resolvedRefs;
|
||||
|
|
|
|||
Loading…
Reference in a new issue