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

MenuItem2 icon with custom element renders icon="[object Object]" attribute #5829

Closed
iongion opened this issue Jan 7, 2023 · 0 comments · Fixed by #5835
Closed

MenuItem2 icon with custom element renders icon="[object Object]" attribute #5829

iongion opened this issue Jan 7, 2023 · 0 comments · Fixed by #5835

Comments

@iongion
Copy link

iongion commented Jan 7, 2023

Environment

    "@blueprintjs/core": "^4.13.0"
    "@blueprintjs/icons": "^4.11.0"
    "@blueprintjs/popover2": "^1.10.2"

Any browser, any OS

Code Sandbox

https://fi6jkt.csb.app/

Please ignore the styling issues

Steps to reproduce

  1. Use anything than a IconName icon

Actual behavior

icon="[object Object]" attribute is present in the DOM

Expected behavior

The attribute not to be present

Possible solution

Avoid stringifying when the icon is a custom element as the type definition allows it.

(property) icon?: BlueprintIcons_16Id | MaybeElement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants