<script src="https://cdnjs.cloudflare.com/ajax/libs/riot/3.4.4/riot+compiler.min.js"></script>
<some-form></some-form>
<div>
<h1>issue:</h1>
<p>both <code><yield/>s</code> work fine on initial mount, but the one nested in the riot tag does not update. i cannot isolate the cause of this behavior, nor find any way to make the child tag (<code><a-dropdown></code>) update the yielded content.</p>
<p>why doesn't this cascade? can anyone make it cascade?</p>
</div>
<script type="riot/tag">
<some-form>
<a-select>
<li>zero</li>
<li each="{item in opts.list || parent.list}">{item.text}</li>
</a-select>
this.on('mount', function () {
// simulated ajax response
this.update({ list: [{ text: 'one' }, { text: 'two' }, { text: 'three' }] });
});
</some-form>
<a-select>
<ul><yield/></ul>
<hr>
<a-dropdown list={parent.list}>
<yield/>
</a-dropdown>
</a-select>
<a-dropdown>
<ul><yield/></ul>
</a-dropdown>
</script>
CSS
div {
margin: 1em 2em;
padding: .5em 1.5em;
background: #ddd;
border-radius: .5em;
}
div h1 { font-size: 1.5em; }
JavaScript
riot.mount('*');
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.