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

Scroll horizontally without wrapping? #21

Open
sarbogast opened this issue Jul 11, 2022 · 2 comments
Open

Scroll horizontally without wrapping? #21

sarbogast opened this issue Jul 11, 2022 · 2 comments

Comments

@sarbogast
Copy link

I am trying to use this component as an inline editor for a data grid where the value I'm editing is a list of string. Given that the ChipsInput appears in a cell of the data grid, it should only show all the chips on one line, with the ability to scroll horizontally when there are more chips than can be visible in the width of the column. I was hoping that maxLines would allow me to add this constraint, but it doesn't seem to do anything. Is it possible to have this kind of behaviour with the component as it is?

@zsoerenm
Copy link
Owner

zsoerenm commented Jul 12, 2022

No, maxLines corresponds only to the input and not to the already selected chips.
If you'd like to add this behaviour, you'll have to replace

child: Wrap(
    spacing: 4,
    runSpacing: 4,
    children: chipsAndTextField,
),

with something like

child: Row(
    children: chipsAndTextField,
),

This needs to be changed within this component. I will gladly accept a pull request.

@sarbogast
Copy link
Author

That's what I thought after diving deeper into the code. Here you go: #22

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

No branches or pull requests

2 participants