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

Possibility to swap grids/sides #87

Closed
tali-vitali opened this issue Nov 24, 2021 · 5 comments
Closed

Possibility to swap grids/sides #87

tali-vitali opened this issue Nov 24, 2021 · 5 comments

Comments

@tali-vitali
Copy link

Can you please tell me if it is possible to forcibly swap the grids? While maintaining the logic of the migration buttons.
For example, to force a grid with selected items to the left instead of the right.

@tali-vitali tali-vitali changed the title Possiblity to swap grids/sides Possibility to swap grids/sides Nov 24, 2021
@javier-godoy
Copy link
Member

Hello.

If the component is inside of an RTL container, the grid with the selected items will be positioned to the left.
image

For LTR languages, TwinColGrid is rendered as a vaadin-horizontal-layout inside of a vertical layout. You can set a flex-direction: row-reverse style in order to swap the grids.

image

In both cases, you will also need to rotate the buttons (since the arrow that selects items will always point to the right, regardless of dir/reverse settings)

Please let us know if you think of any addition in the API than can assist in your use case,

@javier-godoy javier-godoy added this to Inbox (needs triage) in Flowing Code Addons (legacy) via automation Nov 24, 2021
@tali-vitali
Copy link
Author

tali-vitali commented Nov 24, 2021

It would be nice to be able to do this out of the box (styles of grids and buttons) with set of one property. And also replace the concepts/namings of "right" and "left" grid (in favor of "available" and "selections" for example), because in our case, as well as in the case of a vertical alignment, it is no longer relevant.

@javier-godoy
Copy link
Member

And also replace the concepts/namings of "right" and "left" grid (in favor of "available" and "selections" for example), because in our case, as well as in the case of a vertical alignment, it is no longer relevant.

That's right, the left/right naming convention predates the orientation feature. I'll create a separate issue for discussing that.

@javier-godoy javier-godoy moved this from Inbox (needs triage) to To Do in Flowing Code Addons (legacy) Nov 24, 2021
@javier-godoy javier-godoy self-assigned this Nov 24, 2021
@javier-godoy javier-godoy moved this from To Do to In Progress in Flowing Code Addons (legacy) Nov 25, 2021
javier-godoy added a commit that referenced this issue Nov 25, 2021
@paodb paodb closed this as completed in 7b768d8 Nov 25, 2021
Flowing Code Addons (legacy) automation moved this from In Progress to Done Nov 25, 2021
@javier-godoy
Copy link
Member

Released in v2.5.0

@tali-vitali
Copy link
Author

thanks!

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

No branches or pull requests

2 participants