react-infinite-scroll-component icon indicating copy to clipboard operation
react-infinite-scroll-component copied to clipboard

Pull-to-refresh optional for mouse events

Open BenjaVR opened this issue 4 years ago • 6 comments

With these changes one can disable the mouse events for the pull-to-refresh feature. This way you have the option to only enable this feature on touch devices.

BenjaVR avatar May 11 '20 07:05 BenjaVR

Please merge, the current behavior is very irritating.

I would even disable the mouse events by default.

M0ns1gn0r avatar Jul 01 '20 09:07 M0ns1gn0r

I think same too. This PR should be merge.

ethaizone avatar Jan 11 '21 12:01 ethaizone

Can you please also change the prop table in the readme?

ankeetmaini avatar Feb 07 '21 16:02 ankeetmaini

Could you also please tell the issue which this fixes? On touch events this would work seamlessly I assume?

ankeetmaini avatar Feb 07 '21 16:02 ankeetmaini

Could you also please tell the issue which this fixes? On touch events this would work seamlessly I assume?

These changes can disable the 'pull down to refresh' for mouse events. Motivation is that this feature is something that comes from the mobile (= touch) world and can be really inconvenient when used on a desktop.

Here is a modified CodeSandbox to demonstrate a problem: https://codesandbox.io/s/goofy-dream-cfyx4?file=/src/index.js Try to select the text of one 'row', without refreshing the whole list.

There are other solutions that can be applied on the consumer-side, such as blocking mouse events when dragging over text, or setting the pullToRefresh boolean to false based on a mobile/desktop-device detection mechanism ... But I don't think all of these solutions are that 'easy' to apply or even work that good when you want to get things to just work.

Can you please also change the prop table in the readme?

Done!

BenjaVR avatar Mar 07 '21 09:03 BenjaVR

@ankeetmaini does this have any chance to get merged, or should I close the PR?

BenjaVR avatar Mar 04 '22 09:03 BenjaVR