nstudio / nativescript-checkbox

NativeScript plugin for checkbox UI component
Other
119 stars 56 forks source link

*ngFor iOS issue #28

Open tushar-1health opened 7 years ago

tushar-1health commented 7 years ago

Hello,

We tried out Checkbox with ngFor. However, If we setup a single element and hardcode it it works fine w/ iOS. But as soon as we move it to a StackLayout with ngFor it doesn't show up in iOS.

PS: Android works fine.

                <StackLayout orientation="vertical">
                    <Label verticalAlignmet="center" text="Category"></Label>
                    <WrapLayout orientation="horizontal">
                        <StackLayout *ngFor="let category of categories">
                            <CheckBox #CB1 font-size="18" [text]="category.name" checked="false" (checkedChange)="selectedCategories($event, category.id)"></CheckBox>
                        </StackLayout>
                    </WrapLayout>
                </StackLayout>
bradmartin commented 7 years ago

Might be a layout issue. Could you try setting fixed height/width on the check box inside the layout and possibly a height on the parent layout to see if it is visible then.

On Thu, Mar 30, 2017, 8:56 AM tushar-1health notifications@github.com wrote:

Hello,

We tried out Checkbox with ngFor. However, If we setup a single element and hardcode it it works fine w/ iOS. But as soon as we move it to a StackLayout with ngFor it doesn't show up in iOS.

PS: Android works fine.

            <StackLayout orientation="vertical">
                <Label verticalAlignmet="center" text="Category"></Label>
                <WrapLayout orientation="horizontal">
                    <StackLayout *ngFor="let category of categories">
                        <CheckBox #CB1 font-size="18" [text]="category.name" checked="false" (checkedChange)="selectedCategories($event, category.id)"></CheckBox>
                    </StackLayout>
                </WrapLayout>
            </StackLayout>

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bradmartin/nativescript-checkbox/issues/28, or mute the thread https://github.com/notifications/unsubscribe-auth/AFulhGZrn8CVOo8mfIOH6ynDB8sEONuvks5rq7SegaJpZM4MuZYY .

tushar-1health commented 7 years ago

@bradmartin Thanks. The issue is with Dropdown element. As soon as we enable the dropdown element the Checkbox doesn't show up This particularly is with ios because its working w/ Android. Also, the checkbox text isn't visible when trying to embed it on ios.

Regards