Skip to content

Placeholder size not updating until a state change #226

Description

@elizabethhyer

I have an app that uses sizeme and CSS grid. When the app first renders (and on a hard or soft reload) the component that uses sizeme is squished, widthwise. It seems like the placeholder is taking its size estimate from grid.

The problem is that the size doesn't ever update until there's been a state change. Right now, as a work around, I'm updating state whenever the mouse enters the component, and this allows sizeme to start working (updating size when the screen is resized, using the entire width of the component instead of a single grid area).

I'm sorry I don't have a great way to illustrate this in a sandbox, but has anyone seen a component using sizeme get 'locked in' to a size until a state change?

adding noPlaceholder doesn't change this behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions