dizco / react-scrollable-feed Goto Github PK
View Code? Open in Web Editor NEWA smart react component to scroll down automatically
Home Page: https://dizco.github.io/react-scrollable-feed/
License: BSD 3-Clause "New" or "Revised" License
A smart react component to scroll down automatically
Home Page: https://dizco.github.io/react-scrollable-feed/
License: BSD 3-Clause "New" or "Revised" License
Describe the bug
The component is contantly logging componentDidUpdate and other events. I noticed someone added a debug flag to disable this in the repository a month ago however the latest version is 2 months old as does not include this. Please advise.
To Reproduce
Steps to reproduce the behavior:
Install and go to log on render of component.
Expected behavior
Not to log all the time or have a debug field.
Describe the bug
When there are more than just a few entries within the ScrollableFeed, Microsoft Edge will blank.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screen to not blank and the items in the ScrollableFeed to be displayed properly
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
This is the error displayed within the console:
[object Error]: {description: "Object doesn't support property or method 'scrollBy'", message: "Object doesn't support property or method 'scrollBy'", number: -2146827850, stack: "TypeError: Object doesn't support property or method 'scrollBy' at t.defaultProps.animateScroll (https://dizco.github.io/react-scrollable-feed/static/js/main.d2e505ac.chunk.js:1:2559) at t.prototype.scrollParentToChild (https://dizco.github.io/react-scrollable-feed/static/js/main.d2e505ac.chunk.js:1:2098) at t.prototype.componentDidUpdate (https://dizco.github.io/react-scrollable-feed/static/js/main.d2e505ac.chunk.js:1:1514) at Mi (https://dizco.github.io/react-scrollable-feed/static/js/1.e63eb374.chunk.js:1:99275) at Ri (https://dizco.github.io/react-scrollable-feed/static/js/1.e63eb374.chunk.js:1:94905) at Oi (https://dizco.github.io/react-scrollable-feed/static/js/1.e63eb374.chunk.js:1:94277) at ji (https://dizco.github.io/react-scrollable-feed/static/js/1.e63eb374.chunk.js:1:100475) at Sn (https://dizco.github.io/react-scrollable-feed/static/js/1.e63eb374.chunk.js:1:39902)"}
Describe the bug
If the scrollable div doesn't initially have enough content to show a scrollbar, but new items are added later to require a scrollbar, users aren't automatically scrolled to the bottom.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Once a scrollbar appears, users should be scrolled to the bottom. Once at the bottom, users should be able to scroll back up with their scroll position not changing when new items are added.
Desktop (please complete the following information):
Additional context
forceScroll
could be set to true, however that would also force scrolling to the bottom if a user scrolls up later.
Hello!
Nice project, but I've read documentation and really wondered is it possible to make infinite scroll with with component? In usual onScroll event I can use e.target.scrollTop === 0 to determine if scroll at top, to fetch new items from server. But in this component I've got only isAtBottom parameter. If make infinite scroll possible, at least it should be in examples.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
Scrolling down, then expanding the browsers height produces white space within scrollable area.
This seems to be only an issue on safari. I would like to try to solve this myself but i'm not exactly sure what is causing this.
Another thing I've noticed is every now and again (seemingly randomly), the scrollable area jumps up adding white space in the same way. I'm not sure if these two problems are related but if this first is fixed, it may solve the second.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Message to stick to bottom of window revealing new items
Desktop (please complete the following information):
I am trying to use the scollable feed component using a single component as a child:
https://github.com/stephane-monnot/react-vertical-timeline
It is working perfectly as long as I set the forceScroll property, but removing it the feed only scrolls one or two times before stopping it. After manually scrolling to the bottom it resumes auto-scrolling but stops again shortly afterwards. It looks like isViewable starts returning false for some reason.
To Reproduce
Steps to reproduce the behavior:
I added the component to your default example:
https://github.com/Snaptags/react-scrollable-feed/tree/VerticalTimeline/example
Just do npm install;npm start
to reproduce the issue.
Expected behavior
The content should auto-scroll while at the end of the list.
Desktop:
Any ideas?
This feature can be helpful for pagination where when the user scrolls to the top, we can fire a callback that lets us load previous data.
Is your feature request related to a problem? Please describe.
I got problem with the library is lack of current position in div
While i need the div constant at the bottom, i need to know when it's scrolling down away from top to animation the header of div
Describe the solution you'd like
Add default event onScroll in onScroll of library to use scrollTop, offsetTop and etc
Describe alternatives you've considered
I copied the example in the readme almost exactly and I don't get a scrollable feed. Are there any dependencies that I need?
source code:
import logo from './logo.svg';
import './App.css';
import Button from '@mui/material/Button';
import { useState } from 'react';
import ScrollableFeed from 'react-scrollable-feed'
function App() {
const items = ['Item 1', 'Item 2', 'Item 2', 'Item 2', 'Item 2', 'Item 2'];
return (
<ScrollableFeed>
{items.map((item, i) => <div key={i}>{item}</div>)}
</ScrollableFeed>
);
}
When I inspect in the browser I get this rendered HTML
<div style="max-height: inherit; height: inherit; overflow-y: auto;">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 2</div>
<div>Item 2</div>
<div>Item 2</div>
<div>Item 2</div>
<div>
</div>
</div>
Am I missing something?
Describe the bug
Could you add React 17 as a valid dependency, or perhaps more generally, allow react>=15?
To Reproduce
Steps to reproduce the behavior:
npm install react@17 react-scrollable-feed
npm WARN [email protected] requires a peer of react@^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
I imagine npm 7 produces a (different) warning.
Like a method to scroll to the bottom, it would be great to be able to scroll to the top in the same way. A public method scrollToTop
.
Describe the bug
When a user posts an image in chat, the component will not re-render it's position after the image loads. So the user will need to manually scroll down to the bottom of the image to resume chatting.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect the chat to move to the bottom of the image, if the image was previously the bottom of the page.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
all
Smartphone (please complete the following information):
iOS
Additional context
Add any other context about the problem here.
Are there any plans to support React 18?
Tnx for your usefull work! But what about pagination, when old messages is arriving by portions after scroll to top?
Is your feature request related to a problem? Please describe.
I want to execute a specific behavior when the onScroll event of this component fires - specifically, I'd like to show a "scroll to bottom" button when the user scrolls up, and the last element goes out of view.
Currently, it seems like there is no way to do this.
Describe the solution you'd like
The onScroll prop could be added to the ScrollableFeed component and passed down to the main div that wraps the children. It's an easy solution that would allow us to attach a handler to this event.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.