Skip to content

Text reversed when the RGridLayout in the ListView template with condition on the row #23

Open
@boris01

Description

@boris01

Mr. Yaslem,,
I have a text reversed issue with RGridLayout in the ListView template with condition on the row and more items than screen can show (you need to scroll).
Sometimes you can see reversed text right away, and sometimes after you scroll up and down several times.
The row with the condition can reverse text, the row without a condition works good.
This happens on NS7 angular 11 and NS8 angular 12 with @nativescript-rtl/ui 0.2.0

<GridLayout>
  <ListView [items]="items">
    <ng-template let-item="item" let-i="index">
      <RGridLayout isRtl="true" rows="auto,auto" columns="*,*"  
        [nsRouterLink]="['../item', item.id]">
        <Label *ngIf="i % 2 === 0" row="0" col="0" [text]="item.name"></Label> <!-- Text reversed sometimes -->
        <Label row="1" col="1" [text]="item.name"></Label> <!-- Text good -->
      </RGridLayout>
    </ng-template>
  </ListView>
</GridLayout>

Steps to Reproduce

  1. ns create projectName --ng
  2. ns plugin add @nativescript-rtl/ui
  3. add registration of the RGridLayout in the app.module
  4. Change the ListView template to the code from above in the file item.component.html
  5. Add more items to the array in the file item.service
  6. Run the app and scroll up and down

Result

Screen Shot 2021-06-24 at 10 06 34

Source code for this example
rtlError.zip

Thanks for the great plugin!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions