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

Enable drag scrolling for web interface #315

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nadavrak
Copy link

Description

Enables drag scrolling functionality for web interface by adding mouse and trackpad to the dragDevices in ScrollConfiguration.

Problem

Currently, web users can only scroll using the scrollbars, which limits usability.

Solution

Added ScrollConfiguration with expanded dragDevices to include mouse and trackpad support.

Testing

Tested on:

  • Chrome

Added code to build method:

// Add a ScrollConfiguration wrapper with dragDevices including PointerDeviceKind.mouse
return ScrollConfiguration(
behavior: ScrollConfiguration.of(context).copyWith(
dragDevices: {
PointerDeviceKind.touch,
PointerDeviceKind.mouse,
PointerDeviceKind.trackpad,
},
)

@maxim-saplin
Copy link
Owner

Not sure if I understand the problem... https://maxim-saplin.github.io/data_table_2/#/datatable2 - this sample doesn't have any issues with mouse, trackpad or touch scrolling (tested on desktop and mobile)

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

Successfully merging this pull request may close these issues.

2 participants