Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YMapEvent issues #55

Closed
davidbrochart opened this issue May 12, 2022 · 1 comment · Fixed by #66
Closed

YMapEvent issues #55

davidbrochart opened this issue May 12, 2022 · 1 comment · Fixed by #66
Assignees

Comments

@davidbrochart
Copy link
Collaborator

The documentation says:

  • "The target references the YText element that receives the update". It is not a YText but a YMap.
  • keys :List[YMapEventKeyChange]: it is not a List but a Dict.
  • delta :List[Dict]: there is not delta attribute.
  • path(self) → List[Union[int, str]]: it seems to always return an empty list. Also I don't understand the description: "Array of keys and indexes creating a path from root type down to current instance of shared type (accessible via target getter)".

Also, how can we access the YMapEvent object? y_py.YMapEvent doesn't exist.

@Waidhoferj Waidhoferj self-assigned this May 13, 2022
Waidhoferj added a commit that referenced this issue Jul 4, 2022
Fixes #55
- All events have a string representation
- Removed extraneous `delta` prop in `YMapEvent`
- Fixed `YMapEvent` typo that said YText
- Improved `YMapEvent` types and documentation.
@Waidhoferj
Copy link
Collaborator

@davidbrochart the path attribute only shows up when you are fielding an event inside an observe_deep() callback. It will show the path from the root to that element. I updated the docs to reflect this. Thanks for bringing that up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants