Swipe Action Doesn't work Properly in Right To Left Languages
Closed this issue · 1 comments
Addallah commented
When Swiping to Close a Card for Example in Right To Left Languaes such as Arabic ,the card doesn't move in the right direction with the User finger, insted you will need to swipe in the other direction to close the Card.
Screen.Recording.2024-01-15.at.11.46.43.PM.mov
A temporary solution is to Override the default EnvironmentValue for layouDirection and set it to .leftToRight
CardView()
.fxSwipeActions(
leading: FXSwipeActionButton(
iconType: .system("trash.fill"),
type: .leading,
action: {
// action()
},
tint: Color.pink
),
trailing: FXSwipeActionButton(
iconType: .system("star.fill"),
type: .trailing,
action: {
// action()
},
tint: Color.Primary
))
.environment(\.layoutDirection, .leftToRight)
X901 commented
Fixed in version 1.1.0
now the library suppourt both RTL and LTR languages