Преглед на файлове

Add note to chain .toString() to keep false

David Leininger преди 4 години
родител
ревизия
5f09c37d2f
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      README.md

+ 2 - 0
README.md

@@ -293,6 +293,8 @@ This will add or remove the `disabled` attribute when `myVar` is true or false r
 
 Boolean attributes are supported as per the [HTML specification](https://html.spec.whatwg.org/multipage/indices.html#attributes-3:boolean-attribute), for example `disabled`, `readonly`, `required`, `checked`, `hidden`, `selected`, `open`, etc.
 
+> Note: If you need a false state to show for your attribute, such as `aria-*`, chain `.toString()` to the value while binding to the attribute. For example: `:aria-expanded="isOpen.toString()"` would persist whether  `isOpen` was `true` or `false`.
+
 **`.camel` modifier**
 **Example:** `<svg x-bind:view-box.camel="viewBox">`