bem / bem-components

Set of components for sites development
https://bem.info/libraries/classic/bem-components/6.0.0/
Other
332 stars 86 forks source link

Block select with bemjson as an option behaves wrongly #1591

Open bu1ka opened 9 years ago

bu1ka commented 9 years ago

Block select with custom bemjson as an options (modifier mode is set to radio) in _updateButton method will use domElem.text() in menu-item's method getText and will return a sting instead of that bemjson.

ex:

options: [
   {val: 1, text: {block: 'form', elem: 'price', mods: {type: 'rub'}, content: 'Р'}},
   {val: 2, text: '$'}
]

when first option will be checked:

select._updateButton -> select._getCheckedItems() -> menu-item.getText() => 'P' instead of '<div class="form__price form__price_type_rub">P</div>

narqo commented 9 years ago

It looks like the time for #529 has come