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

Adding methods to get computed props #3395

Merged
merged 9 commits into from
Jul 26, 2024
Merged

Conversation

srobertson86
Copy link
Contributor

Adding methods to get computed props from Quasar elements, using the QTable as a proof of principle

srobertson86 and others added 6 commits July 24, 2024 13:49
Adding methods to get computed props from Quasar elements, using the QTable as a proof of principle
Adding methods to get computed props from Quasar elements, using the QTable as a proof of principle
Adding methods to get computed props from Quasar elements, using the QTable as a proof of principle
Adding methods to get computed props from Quasar elements, using the QTable as a proof of principle
Adding methods to get computed props from Quasar elements, using the QTable as a proof of principle
@falkoschindler falkoschindler self-requested a review July 25, 2024 06:15
@falkoschindler falkoschindler added the enhancement New feature or request label Jul 25, 2024
@falkoschindler falkoschindler added this to the 1.4.30 milestone Jul 25, 2024
Copy link
Contributor

@falkoschindler falkoschindler left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request, @srobertson86!

I just reviewed your code and made some minor changes. The one thing I wasn't so sure about were these async properties. Even though they are technically possible in Python, they kind of contradict the convention of properties being used for quick, cheap attribute access, while methods are for more costly acquisitions. In this case we need to await a websocket request, which can take significant time. And we don't want the users to accidentally access the async property repeatedly in a for-loop, but do it once before iterating over the resulting list. Long story short, I think it is better to use async methods, like we do, e.g., for ui.aggrid.get_selected_rows.

@falkoschindler falkoschindler merged commit 04649eb into zauberzeug:main Jul 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants