nextui-org / nextui

🚀 Beautiful, fast and modern React UI library.
https://nextui.org
MIT License
21.5k stars 1.4k forks source link

[BUG] - lack of RTL support in Pagination #2858

Open lgariv opened 5 months ago

lgariv commented 5 months ago

NextUI Version

2.3.5

Describe the bug

When setting dir="rtl", the arrows are sometimes rendering the opposite directions and if not setting "disableCursorAnimation" the 1st page is on the opposite side as well, as seen in the screenshot.

If setting the disableCursorAnimation prop it is working fine for some reason, but that's not ideal.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. create a new next app with next@14.2.2
  2. create a div with dir="rtl"
  3. inside the div, create a table with bottomContent of Pagination

Expected behavior

Expected to see the symbols with the appropriate direction and the correct layout with the animations on.

Screenshots or Videos

Screenshot 2024-04-24 at 16 53 14

Operating System Version

macOS Sonoma 14 (arm64)

Browser

Chrome

linear[bot] commented 5 months ago

ENG-724 [BUG] - lack of RTL support in Pagination

wingkwong commented 5 months ago

Can you share some code? Looks fine in storybook

image

lgariv commented 5 months ago

@wingkwong

Can you share some code? Looks fine in storybook

image

Here's a minimal version of the code to reproduce my situation (used static data instead of useSWR)

Screenshot 2024-04-25 at 23 52 11 Screenshot 2024-04-25 at 23 52 15
molaeiali commented 4 months ago

As a temporary fix (Until it's fixed properly) I tried this:

          classNames={{
            next: "scale-x-[-1]",
            prev: "scale-x-[-1]",
            forwardIcon: "scale-x-[-1]",
          }}

Or you can customize it completely using custom icons by implementing this: https://nextui.org/docs/components/pagination#custom-items

lgariv commented 4 months ago

As a temporary fix (Until it's fixed properly) I tried this:

          classNames={{
            next: "scale-x-[-1]",
            prev: "scale-x-[-1]",
            forwardIcon: "scale-x-[-1]",
          }}

Or you can customize it completely using custom icons by implementing this: https://nextui.org/docs/components/pagination#custom-items

That doesn't help the numbering tho

tareq96 commented 4 months ago

Still an issue with the latest version v2.3.6

@wingkwong just try this on the site and you will be able to reproduce it

image
wingkwong commented 4 months ago

Will take a look when im free

lgariv commented 3 weeks ago

@wingkwong hey, is there anything new regarding this issue?

HasanHaghniya commented 5 days ago

any updates?

wingkwong commented 5 days ago

Sorry. Been occupied by other stuff. I'll free this issue first and see who wanna take it.