Skip to content

Commit

Permalink
Merge pull request #205 from georgejecook/feat/selection-item-complet…
Browse files Browse the repository at this point in the history
…ion-state

fix(core): adds itemCompletionState to mc_Selection
  • Loading branch information
georgejecook authored Jun 21, 2022
2 parents da8cb36 + 94d65ee commit 86a6dd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/source/core/Selection.bs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ namespace mc
' pending|success|error - can listen for this on async selection scenarios - the state should only be changed once!
state = "pending"

' none|inProgress|success|error
itemCompletionState = "pending"

' info pertaining to state changes
result = {}

Expand Down
6 changes: 3 additions & 3 deletions src/source/view/BaseView.bs
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ namespace mv
'++ Selection Support
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

protected function createSelection(initialItem as mc.types.node, action = "display" as string, parentCollection = invalid as mc.types.node, actionInfo = {} as mc.types.assocarray, targetScreen = "" as string)
protected function createSelection(initialItem as mc.types.node, action = "display" as string, actionInfo = {} as mc.types.assocarray, targetScreen = "" as string, selectionCompName = "mc_Selection" as string)
id = `${m.name}-${mc.getString(initialItem, "id")}-${action}`
selection = mc.createSGNode("mc_Selection", invalid, id, {
selection = mc.createSGNode(selectionCompName, invalid, id, {
initialItem: initialItem
currentItem: initialItem
parentCollection: parentCollection
parentCollection: invalid
action: action
originScreen: m.getMField("top")
targetScreen: targetScreen
Expand Down

0 comments on commit 86a6dd6

Please sign in to comment.