Skip to content

Uncaught Error: Component's "only-when-overflow" property should be a function, but got [boolean] instead #4085

Description

@MuthuuJegan
  • Check if updating to the latest Preact version resolves the issue

Describe the bug

I'm using a custom web component called my-tooltip and there's a boolean attribute called only-when-overflow.When using the only-when-overflow attribute i'm getting the below error.

Uncaught Error: Component's "only-when-overflow" property should be a function, but got [boolean] instead
<my-tooltip only-when-overflow="true" for="a1a1">..</my-tooltip>

To Reproduce

We usually use a attribute which starts with on to handle events eg: onClick, onKeyPress which requires function. Here I'm using a boolean attribute which starts with on and the error thrown

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions