Skip to content

[labs/virtualizer] Padding does not trigger layout like gap does #3285

@Westbrook

Description

@Westbrook

Which package(s) are affected?

Virtualizer (@lit-labs/virtualizer)

Description

The setter workflow for padding in SizeGapPaddingBaseLayout does not include calls to this._triggerReflow(); the way that the setter workflow for gap does, which prevents updates to the padding value of the layout from effecting layout until changes to something else in the calculation is updated.

Reproduction

Visit this demo

  1. See that `padding` and gap are 10px each
  2. Click "Update `gap`" to see gap change
  3. Click "Update `padding`" to see padding updated but not effect the layout
  4. Click "Update `padding`" until it reports a larger number, then click "Update `gap`" and see the layout finally update the "padding"

Workaround

Patch package works to just add a call to this._triggerReflow(); at the end of the padding setter, or only change both together.

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

0.7.1

Browser/OS/Node environment

All browsers

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions