ui icon indicating copy to clipboard operation
ui copied to clipboard

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

Open boris01 opened this issue 3 years ago • 5 comments

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!

boris01 avatar Jun 24 '21 08:06 boris01

it happen when the component not in render area?

xlmnxp avatar Jun 26 '21 06:06 xlmnxp

Usually yes, But I think that at least once it also happened right on the start

boris01 avatar Jun 26 '21 10:06 boris01

Usually yes, But I think that at least once it also happened right on the start

I will work to fix it

xlmnxp avatar Jun 26 '21 11:06 xlmnxp

Thanks

boris01 avatar Jun 26 '21 12:06 boris01

Same issue with me.

adel12790 avatar Oct 14 '21 14:10 adel12790