Skip to content

Passing boolean props to elements is inconsistent #14128

@pouyam79i

Description

@pouyam79i

Vue version

3.5.24

Link to minimal reproduction

https://play.vuejs.org/#eNp9U01v2zAM/SucLk6BLBm2nYykxT4KbDtsQ1dghygHJ6ZTdbJkSHSaIvB/HyV/xA2KCIYhUY+P1CN5FJ+qaravUaRi4bdOVQQeqa6upVFlZR3BERwWU9jasqoJc2igcLaEhJ0SaaTZWuMJSr+DZUBOkm+otYW/1un8TXJ1guQZZR1mJQ3AMfwASJHGFJL7B+WBP0JPTAzQTFvABRy8H5DrUaSt1f4rFhxsFZ0rZyufwuRqed2ROX6jMz01QK58pjeYp0CuxtbaRGppmnVg7rkL5Tzd2Scm7yWZDMQdbRd/9W49i6En4el84hSbmKY0i3mrNuvMB8Ky0hkhnwAWlG102LZpLGhj8+fhGAwO9m8L65ZSKPYEZaK2UoxAAZZHuuGsDGfLnqXNUXe+s6iqFGPHdqVBEs4jZ2T/5ptZb3zVw9OzRoafXbAy51AWyLp00LLlDfrDDSQO8wS40LG0oxXrMV5nkc7CzF+qMY9yDBrOyZ0UnvcSx32nPu9OVRFTQZ4boFC72aO3hsclFlyK0ARKo/tVkeIGkSLtu0qKjAfh6Ue0hbbq+pl9HnD77xX7oz8EmxS/HXp0ey7McEeZ2yG117d/fuKB98Mll7QOZbxweYfe6jrk2MI+1ybntEe4mO33OPTK7O797YHQ+P5R/Vy0UykFj/+XC08/pfth9rEfJNH8BwgeXgE=

Steps to reproduce

in a table data when rendering rows (using v-for) I want a function to read row data and give me proper props.
I use computed so it will be calculated on my ref object.

1- create a function for calculation of your target element props. it is used to read some data and return props.
2- use computed to calculate final static props.
3- pass props to element which is inside cell rows

What is expected?

As you can see in reproduced link every thing is fine but one issue.
element should be disabled.

look at here:

          :disabled="firstRow?.disabled"
           :style="{ color: firstRow?.disalbed ? 'red' : 'green' }"

color is red but input is not disabled even though firstRow?.disabled is true.

it is expected that element to be disabled

What is actually happening?

everything else works fine but disabled attribute with element.

System Info

Google chrome: Version 137.0.7151.68 (Official Build) (64-bit)

Any additional comments?

on every other platform it works like this. every other element is fine with :disabled passing it like this but element.

it work fine, but in my app it some times works fine but sometimes it does not which creates an inconsistent behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions