react-infinite-scroll-component
react-infinite-scroll-component copied to clipboard
Pull-to-refresh optional for mouse events
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.
Please merge, the current behavior is very irritating.
I would even disable the mouse events by default.
I think same too. This PR should be merge.
Can you please also change the prop table in the readme?
Could you also please tell the issue which this fixes? On touch events this would work seamlessly I assume?
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!
@ankeetmaini does this have any chance to get merged, or should I close the PR?