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

Expand ModelsTree component to accept visibilityHandler as a function #647

Merged
merged 10 commits into from
Sep 18, 2023

Conversation

ViliusBa
Copy link
Contributor

Expand the ModelsTree component to accept visibilityHandler as a callback which returns a visibilityHandler object.

With these changes ModelTree creation workflows look like this:

  • If visibilityHandler is passed as an object, we pass it on and use it without taking care of its disposal.
  • If visibilityHandler is passed as a function, we call the function which creates the object and take care of its disposal.

Also, had to change the way that we are mocking visibilityHandler in our ModelTree tests since it was mocking the visibilityHandler as a function and not as an object, which led to false positives when checking what is the type of the visibilityHandler.

@ViliusBa ViliusBa marked this pull request as ready for review September 13, 2023 18:10
@ViliusBa ViliusBa requested review from a team as code owners September 13, 2023 18:10
Copy link
Member

@grigasp grigasp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to run extract-api.

@ViliusBa ViliusBa merged commit 020f93d into master Sep 18, 2023
2 checks passed
@ViliusBa ViliusBa deleted the modelsTree_parameter_adjustment branch September 18, 2023 06:42
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 this pull request may close these issues.

Tree widget: Change ModelsTreeProps.modelsVisibilityHandler to factory method
2 participants