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
Reproduction:https://limber.glimdown.com/edit?c=JYWwDg9gTgLgBAYQuCA7Apq%2BAzKy4DkAAgOYA2oI6UA9AMbKQZYEDcAUKJLHAN5wwoAQzoBrdABM4AXzi58xcpWo1BI0cFQk27dg1QBneAHlRcALxwAPDHTgyQ2wD5TV1XbAPnHfUbgBpCAtrW3tHdCdAt1DPcKcOPTQ-ADEKMDBqYJsPLwj2OD5eYGw4ImADUzhKwOlpXQLeXgBiYtLy01r8gu6rSponLsb0MgN0Tu6ewLh%2Bwd4aYs7onLiE9AAPbngJdGwhAFcyeDoHAwM4ABE7IPXbVAkzpBRmeF4uojUxSTh2s0tdkfQHAK2DSwQAFABKCxOAQAC3KADofsEAIQweEGJEVUQJArZMLOLp41LAdKZMrY8yNdGIn61aYDCZWABGexgMDQcDQx2AYipvBpmJBpNqThJYDcrPZaEZ1ncBLy0iAA&format=gjs
Code:
import Component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; const Ok = <template>Ok</template>; const Ko = <template>Ko</template>; const Flipper = <template> {{if @isOk Ok Ko}} {{#if @isOk}} <Ok /> {{else}} <Ko /> {{/if}} </template>; export default class Demo extends Component { @tracked isOk = false; flip = () => this.isOk = !this.isOk; <template> <Flipper @isOk={{this.isOk}} /> <button onclick={{this.flip}}>Flip</button> </template> }
Problem:
the inline if doesn't update its returned value when @isOk changes, but the block-form does.
@isOk
The text was updated successfully, but these errors were encountered:
It works with simple strings though.
Sorry, something went wrong.
I mean {{if @isOk 'ok' 'ko'}} And
{{if @isOk 'ok' 'ko'}}
{{#let (if @isOk Ok Ko) as |okko|}} <okko/> {{/let}}
Maybe it's not supposed to render components from inline if. Maybe helper would work. {{if @isOk (ok) (ko)}}
{{if @isOk (ok) (ko)}}
Failing test for #1642
88504e2
734bdaa
No branches or pull requests
Reproduction:https://limber.glimdown.com/edit?c=JYWwDg9gTgLgBAYQuCA7Apq%2BAzKy4DkAAgOYA2oI6UA9AMbKQZYEDcAUKJLHAN5wwoAQzoBrdABM4AXzi58xcpWo1BI0cFQk27dg1QBneAHlRcALxwAPDHTgyQ2wD5TV1XbAPnHfUbgBpCAtrW3tHdCdAt1DPcKcOPTQ-ADEKMDBqYJsPLwj2OD5eYGw4ImADUzhKwOlpXQLeXgBiYtLy01r8gu6rSponLsb0MgN0Tu6ewLh%2Bwd4aYs7onLiE9AAPbngJdGwhAFcyeDoHAwM4ABE7IPXbVAkzpBRmeF4uojUxSTh2s0tdkfQHAK2DSwQAFABKCxOAQAC3KADofsEAIQweEGJEVUQJArZMLOLp41LAdKZMrY8yNdGIn61aYDCZWABGexgMDQcDQx2AYipvBpmJBpNqThJYDcrPZaEZ1ncBLy0iAA&format=gjs
Code:
Problem:
the inline if doesn't update its returned value when
@isOk
changes, but the block-form does.The text was updated successfully, but these errors were encountered: