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

Use new FetchSelectedOptions in onRecord/s to skip redundant fetch #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexmojaki
Copy link
Collaborator

This is a performance optimization which may or may not be significant, so it's not particularly important, it's just an itch I wanted to scratch. It make use of the new options in gristlabs/grist-core@4e67c67. Before this, when triggering the on_records callback, the initial payload of records (which had been painstakingly transposed and decoded) was immediately discarded in favour of fetch_selected_table which had the keepEncoded option. The behaviour should be unchanged.

Along the way I ran into a confusing error about NoneType not being subscriptable, and had to dig deep to see that it was because I'd forgotten to link the notebook to another widget. Now a more helpful error is raised.

…aise more helpful error when using a callback without linking widgets.
alexmojaki added a commit to gristlabs/grist-widget that referenced this pull request Jan 5, 2024
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.

1 participant