This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
[Scopes] expanded properties are not updated while stepping #2509
Merged
Merged
Changes from 2 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
96fc2a6
Fix expanded properties are not updated while stepping
arthur801031 47f48cd
Revert yarn.lock
arthur801031 1e61143
Move code logic to ObjectInspector
arthur801031 a6ef1b4
Made a few corrections
arthur801031 b1ed6d1
Retrieve property values
arthur801031 79bb50b
Remove code from previous commit
arthur801031 ac94d3a
Revert to previous implementation
arthur801031 1e41c11
Revert yarn.lock
arthur801031 ed50775
Merge branch 'master' into properties
jasonLaster 7932d8f
Move code logic to object-inspector and add a unit test
arthur801031 8557ef9
Simplify code
arthur801031 File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,7 +181,19 @@ function getChildren( | |
// node would be a new instance every render. | ||
const key = item.path; | ||
if (actors && actors[key]) { | ||
return actors[key]; | ||
const properties = item.contents.value.preview.ownProperties; | ||
let thisActor = actors[key]; | ||
for (let pKey in properties) { | ||
if (properties.hasOwnProperty(pKey)) { | ||
const cacheObject = thisActor.filter(a => a.name == pKey)[0]; | ||
const cacheObjectIndex = thisActor.findIndex(a => a.name == pKey); | ||
// Assign new values to the cache actor if it becomes stale | ||
if (cacheObject && getValue(cacheObject) != properties[pKey].value) { | ||
thisActor[cacheObjectIndex].contents = properties[pKey]; | ||
} | ||
} | ||
} | ||
return thisActor; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. adding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also , the |
||
} | ||
|
||
if (isBucket(item)) { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! If we move this change to the ObjectInspector.js here instead.
Then we can do
this.props.setActors(actors);
after, which will set the cached actor.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great suggestion! I thought using
this.props.setActors(actors);
inrender
would cause an error, but I was wrong! Thank you! 😊