Skip to content

Commit

Permalink
Merge pull request #207 from georgejecook/fix/observe-selection-compl…
Browse files Browse the repository at this point in the history
…etion

fix(core): fixes completion state callback not firing for selection
  • Loading branch information
georgejecook authored Jun 22, 2022
2 parents b2e88d1 + ab458d2 commit f10f29d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/source/view/BaseView.bs
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ namespace mv
'assumes that you have an appController instance that will handle the selection
appController = m.getInstance("appController")
if appController <> invalid
m.observeNodeField(selection, "itemCompletionState", m.onSelectionCompletionStateChange, "both", true)
result = appController@.onExecuteSelection(selection)
if result = invalid
m.log.error("Selection could not be executed. Do you have an appController assigned, with an onExecuteSelection method?")
Expand All @@ -243,7 +244,6 @@ namespace mv
else
m.log.info("selection requires async resolution")
m.observeNodeField(selection, "state", m.onSelectionStateChange, "both", true)
m.observeNodeField(selection, "itemCompletionState", m.onSelectionCompletionStateChange, "both", true)
end if
end if
else
Expand Down

0 comments on commit f10f29d

Please sign in to comment.