Skip to content

Commit

Permalink
Merge pull request #202 from georgejecook/fix/better-updates-for-row-…
Browse files Browse the repository at this point in the history
…and-grid

imrpoves updating for row and grid
  • Loading branch information
georgejecook authored Jun 15, 2022
2 parents d158be9 + 430212b commit eb4fbd0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions src/source/ml/GridRow.bs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ namespace ml
end function

protected override function onContentItemsChange(changes as mc.types.array)
m.log.info("This content has changed in some way")
? " GRID CHANGES"
m.viewManager.onContentItemsChange(changes)
if changes <> invalid and changes.count() > 0
m.log.info("This content has changed in some way")
m.viewManager.onContentItemsChange(changes)
else
m.viewManager.updateChangedItems()
end if
end function

public override function jumpToItem(index as integer, animated as boolean)
Expand Down
9 changes: 6 additions & 3 deletions src/source/ml/HorizontalRow.bs
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,12 @@ namespace ml
end function

protected override function onContentItemsChange(changes as mc.types.array)
m.log.info("This content has changed in some way")
? " CHANGES "
m.viewManager.onContentItemsChange(changes)
if changes <> invalid and changes.count() > 0
m.log.info("This content has changed in some way")
m.viewManager.onContentItemsChange(changes)
else
m.viewManager.updateChangedItems()
end if
end function

protected override function onIsRenderedChange()
Expand Down

0 comments on commit eb4fbd0

Please sign in to comment.