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

ScalaFnComponent doesn't include displayName #1087

Open
nafg opened this issue Oct 24, 2023 · 1 comment
Open

ScalaFnComponent doesn't include displayName #1087

nafg opened this issue Oct 24, 2023 · 1 comment

Comments

@nafg
Copy link

nafg commented Oct 24, 2023

Here is my "userland" solution:

  implicit class withDisplayName[P, CT[-p, +u] <: CtorType[p, u]](self: ScalaFnComponent[P, CT]) {
    def withDisplayName(name: String) = {
      self.raw.asInstanceOf[js.Dynamic].displayName = name
      self
    }
    def withDisplayName(implicit name: FullName): ScalaFnComponent[P, CT] =
      withDisplayName(name.value.stripSuffix(".component"))
  }
@nafg
Copy link
Author

nafg commented Oct 24, 2023

Sorry I forgot about #1065 and created a new issue

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

No branches or pull requests

1 participant