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

I would like to be able to disable widget.List #1499

Closed
ababo opened this issue Nov 3, 2020 · 12 comments
Closed

I would like to be able to disable widget.List #1499

ababo opened this issue Nov 3, 2020 · 12 comments
Labels
enhancement New feature or request Keyboard Items for keyboard control

Comments

@ababo
Copy link

ababo commented Nov 3, 2020

Can this be done?

@andydotxyz
Copy link
Member

We don't have this feature at present. What would a disabled List look / behave like?

@ababo
Copy link
Author

ababo commented Nov 3, 2020

Like disabled widget.Radio, i.e. gray and not responding to user interactions.

@andydotxyz
Copy link
Member

I'm not sure what we can turn gray - in this instance all the contents are controlled by the app developer.
We could disable user input I suppose, just to stop the OnSelected callbacks from happening?

@andydotxyz andydotxyz added the enhancement New feature or request label Nov 3, 2020
@stuartmscott
Copy link
Member

Disabling user interaction for selection and hover would make sense, but I would be hesitant of disabling user interaction for scrolling.

How would this apply to future keyboard navigation/interactions?

@ababo
Copy link
Author

ababo commented Nov 4, 2020

I guess the disabled list should not be focusable, but I'm not sure.

@ababo
Copy link
Author

ababo commented Nov 4, 2020

@andydotxyz BTW Is there a master GitHub issue for keyboard navigation support? It looks like soon I will desperately need this features in my software, so I would like to see at least some spec as you maintainer guys see it. May consider to participate in this development.

@andydotxyz
Copy link
Member

Is there a master GitHub issue for keyboard navigation support?

Sadly we have not pulled one together, that is a good idea.
A lot of it is in progress but we don't want to miss anything. I'll try and pull this together. We will likely need another one for theme updates as we get into 2.0 development proper.

@andydotxyz
Copy link
Member

I have now added the keyboard tag, that will gather keyboard nagivation issues :)

@andydotxyz
Copy link
Member

In planning Bowmore we came by this ticket but could not tell what was really needed.
As List is not an input widget itself what needs to be disabled?
You can disable all items inside it to stop user being able to make data changes...

@dweymouth
Copy link
Contributor

Worth noting that you can easily achieve this with an extended List, just adding the Disableable interface methods. By default this does nothing other than preventing it from being focused by the focus manager. This, combined with making your list items handle Tapped, can completely disable selection on the list. To make it grayed out when disabled, have your extended list render with a rectangle on top of the base list, which is semi-transparent gray for disabling, or hidden when not disabled.

@andydotxyz
Copy link
Member

I'm tempted to close this now there is a known way to do it in user code. As posted earlier I don't really think there is a case for making standard widgets disabled that are not input widgets (or buttons)

@dweymouth
Copy link
Contributor

I agree. Closing this as it's possible to achieve the desired behavior in user code.

@dweymouth dweymouth reopened this Jan 9, 2024
@dweymouth dweymouth closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Keyboard Items for keyboard control
Projects
None yet
Development

No branches or pull requests

4 participants