You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to change the value of binded property for custom component.
I am using RivetsJS version: 0.9.6 with sightglass unbundled (because I load it via requirejs).
I managed to write 3 app pages (Wordpress plugin admin pages) with RivetsJS working properly, but I didn't used components until now. I thought that using component (custom <select>) will ease my work with nested rv-each-option="options" for <select> element.
I have a rv-each-asset="model.assets" loop working on this:
<div><label>Portfolio</label><selectrv-value="model.portfolio_id" name="portfolio_id"><option>-- choose --</option><optionvalue="1">First portfolio</option><optionvalue="2">Second portfolio</option><optionvalue="3">Third portfolio</option><optionvalue="5">Another portfolio</option></select></div><tableclass="pg-table"><trrv-each-asset="model.assets"><td><inputtype="hidden" rv-value="asset.id" name="asset[id]"><inputtype="hidden" rv-value="asset.id_orbi" name="asset[id_orbi]"><ticker-optionsportfolio-id="model.portfolio_id" assets="portfoliosAssets"></ticker-options></td><td>
HERE IS JUST FOR TESTING, DOES PORTFOLIO_ID CHANGES?
<inputtype="text" rv-value="model.portfolio_id" name="asset[chart][date][from]"></td><td><inputtype="text" rv-value="asset.chart.date.to" name="asset[chart][date][to]"></td><td><textareaname="asset[text]" rv-value="asset.text"></textarea></td><td><inputtype="text" rv-value="asset.params" name="asset[params]"></td><td><inputtype="checkbox" rv-checked="asset.legend" name="asset[legend]"></td><td><buttondata-portfolio-id="" type="button"
class="ui-icon ui-icon-red ui-icon-circle-close" rv-on-click="deleteRow"
rv-data-name="asset.ticker" data-meaning="delete"></button></td></tr></table>
When I use in a browser <select rv-value="model.portfolio_id" name="portfolio_id"> to change model.portfolio_id value - it's fine, it changes the value. But I would like to <ticker-options> see that model.portfolio_id change, what I do wrong?
The text was updated successfully, but these errors were encountered:
I need to change the value of binded property for custom component.
I am using RivetsJS version: 0.9.6 with sightglass unbundled (because I load it via requirejs).
I managed to write 3 app pages (Wordpress plugin admin pages) with RivetsJS working properly, but I didn't used components until now. I thought that using component (custom
<select>
) will ease my work with nested rv-each-option="options" for<select>
element.I have a rv-each-asset="model.assets" loop working on this:
My component is defined like this:
The Rivets is initialized like this:
When I use in a browser
<select rv-value="model.portfolio_id" name="portfolio_id">
to change model.portfolio_id value - it's fine, it changes the value. But I would like to<ticker-options>
see that model.portfolio_id change, what I do wrong?The text was updated successfully, but these errors were encountered: