Skip to content

Conversation

@mattpap
Copy link
Contributor

@mattpap mattpap commented Sep 20, 2024

fixes #14068

@mattpap mattpap added this to the 3.6 milestone Sep 20, 2024
@mattpap mattpap force-pushed the mattpap/14068_update_GridPlot.children branch from edbeac9 to a314591 Compare September 20, 2024 14:33
}

setv(changed_attrs: Attrs, options: HasProps.SetOptions = {}): void {
setv<T extends Attrs>(changed_attrs: Partial<T>, options: HasProps.SetOptions = {}): void {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In theory it should be possible to infer T from typeof this["properties"], but that works in some contexts, but not in all. When it doesn't work, then T == any and we get a dynamically typed API with no warning.

Copy link
Member

Choose a reason for hiding this comment

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

I think this would be an unacceptable burden if end-users were required to specify the type but as setv is really internal API, practically speaking, we can just deal with it.

@mattpap mattpap force-pushed the mattpap/14068_update_GridPlot.children branch from a314591 to f83958f Compare September 20, 2024 14:41
@mattpap mattpap merged commit eae8b0a into branch-3.6 Sep 20, 2024
@mattpap mattpap deleted the mattpap/14068_update_GridPlot.children branch September 20, 2024 18:10
@github-actions
Copy link

github-actions bot commented Jan 1, 2025

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Unable to change figures displayed by altering children attribute of gridplot (or other layout classes) in JS callback

3 participants