Skip to content

fix(view): preserve zero attribute bindings#2171

Open
WarLikeLaux wants to merge 1 commit into
tempestphp:3.xfrom
WarLikeLaux:fix-view-attribute-binding-zero-values
Open

fix(view): preserve zero attribute bindings#2171
WarLikeLaux wants to merge 1 commit into
tempestphp:3.xfrom
WarLikeLaux:fix-view-attribute-binding-zero-values

Conversation

@WarLikeLaux

Copy link
Copy Markdown

Expression attributes used a loose falsy check, so numeric zero values like 0, 0.0, and "0" were omitted from rendered attributes. That dropped meaningful data values such as data-start-percent="0". The renderer now omits false, null, and values that normalize to an empty string, while preserving zero values.

Literal expression attributes passed into view components used the same loose fallback and could turn :foo="0" into true. That path now only falls back to true for empty shorthand attributes.

Fixes #2167

@WarLikeLaux WarLikeLaux requested a review from brendt as a code owner June 13, 2026 15:16
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

Successfully merging this pull request may close these issues.

View attribute binding drops numeric zero values

1 participant