Javascript-форум (https://javascript.ru/forum/)
-   ExtJS (https://javascript.ru/forum/extjs/)
-   -   Почему не работают условия в bind? (https://javascript.ru/forum/extjs/56330-pochemu-ne-rabotayut-usloviya-v-bind.html)

khusamov 10.06.2015 15:23

Почему не работают условия в bind?
 
Почему не работают условия в bind?

bind: {
	disabled: "{!form.isDirty || !form.isValid}"
}


Операнд NOT можно, а ИЛИ нельзя?

novikov 16.06.2015 12:44

Нужно использовать формулы. В писании сказано:

Many configs you will want to bind are boolean values, such as visible (or hidden), disabled, checked, and pressed. Bind templates support boolean negation “inline” in the template. Other forms of algebra are relegated to formulas (see below), but boolean inversion is common enough there is special provision for it.

khusamov 17.06.2015 01:06

Спасибо! Понял.


Часовой пояс GMT +3, время: 21:31.