We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modVal : '*'
declMod
Used for example in https://github.com/bem/bem-components/blob/v3/common.blocks/button/_togglable/button_togglable.js#L12 or https://github.com/bem/bem-components/blob/v3/common.blocks/popup/_target/popup_target.js#L31
modules.define('b1', ['i-bem-dom'], function(provide, bemDom) { provide(bemDom.declBlock(this.name, { m1: function() { console.log('initial m1'); }, m1_v1: function() { console.log('initial m1_v1'); } })); }); modules.define('b1', function(provide, B1) { provide(B1.declMod({ modName: 'm1' }, { m1: function() { console.log('overriden m1'); } })); }); modules.define('b1', function(provide, B1) { provide(B1.declMod({ modName: 'm1', modVal: 'v1' }, { onSetMod: { js: { inited: function() { this.m1(); this.m1_v1(); } } }, m1_v1: function() { console.log('overriden m1_v1'); } })); });
Expected: overriden m1 overriden m1_v1. Actual result: initial m1 overriden m1_v1.
overriden m1 overriden m1_v1
initial m1 overriden m1_v1
The text was updated successfully, but these errors were encountered:
we change semantic of omitted modVal accordingly to setMod (if no modVal it's short cut for modVal : true)
modVal
setMod
modVal : true
so we need to add support for B1.declMod({ modName: 'm1', modVal: '*' }, as in onSetMod
B1.declMod({ modName: 'm1', modVal: '*' },
onSetMod
Sorry, something went wrong.
Add support for modVal : '*' in declMod (closes #1374)
36b2061
Merge pull request #1376 from /issues/1374@v4
7f72a82
Add support for `modVal : '*'` in `declMod` (closes #1374)
dfilatov
No branches or pull requests
Used for example in https://github.com/bem/bem-components/blob/v3/common.blocks/button/_togglable/button_togglable.js#L12 or https://github.com/bem/bem-components/blob/v3/common.blocks/popup/_target/popup_target.js#L31
Expected:
overriden m1 overriden m1_v1
.Actual result:
initial m1 overriden m1_v1
.The text was updated successfully, but these errors were encountered: