Skip to content
New issue

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

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

Open
boris01 opened this issue Jun 24, 2021 · 5 comments

Comments

@boris01
Copy link

boris01 commented Jun 24, 2021

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!

@xlmnxp
Copy link
Member

xlmnxp commented Jun 26, 2021

it happen when the component not in render area?

@boris01
Copy link
Author

boris01 commented Jun 26, 2021

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

@xlmnxp
Copy link
Member

xlmnxp commented Jun 26, 2021

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

I will work to fix it

@boris01
Copy link
Author

boris01 commented Jun 26, 2021

Thanks

@adel12790
Copy link

Same issue with me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants