PeterStaev / NativeScript-Grid-View

A NatvieScript GridView widget.
Apache License 2.0
49 stars 28 forks source link

GridView not showing on iOS #43

Closed juanchofelipe closed 5 years ago

juanchofelipe commented 6 years ago

Hi, I have the following code:

<GridView [items]="sourcesOptions" colWidth="50" rowHeight="40" row="7" col="0" colSpan="3">
        <ng-template let-item="item" let-odd="odd">
                <CheckBox [text]="item.label" checked="false"></CheckBox>
        </ng-template>
</GridView>

The checkboxes are showing correctly on Android, but when I run the project on iOS nothing is showed.

Any help is appreciated!

PeterStaev commented 6 years ago

Hey @juanchofelipe , try with some other control (for example a Switch) and see if it works. If it works then it is something related to the checkbox widget, with which I cannot help you.

juanchofelipe commented 6 years ago

Hi @PeterStaev, thank you so much for your answer. I changed the code to the next one:

<GridView [items]="sourcesOptions" colWidth="50%" rowHeight="100" row="7" col="0" colSpan="3">
      <ng-template let-item="item" let-odd="odd">
              <StackLayout orientation="horizontal">
                       <Switch [checked]="true" class="switch"></Switch>
                       <Label [text]="item.label" textWrap="true"></Label>
              </StackLayout>
      </ng-template>
</GridView>

And again, it works on Android, but on iOS nothing is showed

PeterStaev commented 6 years ago

Hey @juanchofelipe , there seems to be some problem with angular trying this on the playground throws an error. Sadly for the time-being I cannot give you any ETA for the fix as not sure when I will find the time to trace. If you can, feel free to debug and submit a PR for fixing the issue.

juanchofelipe commented 6 years ago

@PeterStaev thank you so much for checking it, I'll wait for a resolution

PeterStaev commented 5 years ago

Hey @juanchofelipe , a bit late but I just tested the last template you gave in https://github.com/PeterStaev/NativeScript-Grid-View/issues/43#issuecomment-424490225 and with the latest version of angular/nativescript and this plugin (5.0.0) it works ok. I guess some of the rewrites I did to make the plugin compatible with TNS 5+ fixed whatever problem there was 😄

So will close the issue. Let me know if you still experience the issue.