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

It should be possible to provide options to ReactWidget. #7420

Closed
jbicker opened this issue Mar 25, 2020 · 1 comment · Fixed by #7422
Closed

It should be possible to provide options to ReactWidget. #7420

jbicker opened this issue Mar 25, 2020 · 1 comment · Fixed by #7422
Assignees
Labels
core issues related to the core of the application enhancement issues that are enhancements to current functionality - nice to haves

Comments

@jbicker
Copy link
Contributor

jbicker commented Mar 25, 2020

Description

It is currently not possible to provide widget options to ReactWidget. This should be possible.

Reproduction Steps

Extend ReactWidget and try to provide options to super class.

@akosyakov akosyakov added core issues related to the core of the application enhancement issues that are enhancements to current functionality - nice to haves labels Mar 25, 2020
@akosyakov akosyakov self-assigned this Mar 25, 2020
@akosyakov
Copy link
Member

akosyakov commented Mar 25, 2020

The motivation here is ability to provide custom html node without dealing with embedded widgets, i.e. something like:

super({
   node: document.createElement('div').appendChild(document.createElement('div'))
});
// this is node which is used for react rendering
this.node.id = 'child-node';
// this first div, now we can mutate it
// without being afraid that react will wipe out manually added content
(this.node.parentNode as HTMLElement).id = 'parent-node';

akosyakov added a commit that referenced this issue Mar 25, 2020
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Mar 26, 2020
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core issues related to the core of the application enhancement issues that are enhancements to current functionality - nice to haves
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants