Comments (10)
@waynehaffenden the warning should be gone if you upgrade to the latest version v0.6.4
🙂
from react-elastic-carousel.
@sag1v Yep, all fixed, great job :)
from react-elastic-carousel.
Thanks @waynehaffenden , can you please create a minimal example in codesandbox?
from react-elastic-carousel.
@sag1v Hopefully this shows what I mean :) https://codesandbox.io/s/cool-kalam-vs4ye?file=/src/App.js
from react-elastic-carousel.
@waynehaffenden Thanks!
Can you please check if this css rule helps:
.rec.rec-slider {
min-height: auto;
}
from react-elastic-carousel.
@sag1v Yes! This fixes the issue, will this be included in your package or is this something I should apply manually to my own projects?
from react-elastic-carousel.
@waynehaffenden I'm not sure it is wise to include in the lib as i think this might break some other views, especially vertical mode. Moreover i didn't encounter your scenario elsewhere, so not sure why exactly you were facing with this bug. Maybe the fact that the height is determined asynchronously after the image was fetched and rendered.
Anyway, i think for now we will leave it as is, if we see some more people get the same bug we will re-think this over.
from react-elastic-carousel.
@sag1v Makes sense, thank you for looking into this for me, really appreciate it.
from react-elastic-carousel.
@sag1v (Sorry!) Since adding your CSS fix above when resizing the browser window, I get this warning from React:
react_devtools_backend.js:6 Over 200 classes were generated for component styled.div with the id of "sc-AxhUy".
Consider using the attrs method, together with a style object for frequently changed styles.
Example:
const Component = styled.div.attrs(props => ({
style: {
background: props.background,
},
}))`width: 100%;`
Any ideas?
I create a Styled div component that wraps your component with the css:
const CarouselWrapper = styled.div`.rec.rec-slider { min-height: auto; }`;
from react-elastic-carousel.
Yeah i think i know where this warning is coming from, i gave the element a height
prop which is a valid html attribute for div's. I should re-name it so it wont get passed down to the underline DOM element.
Edit
Actually its also due to the fact that i'm dynamically setting the height via a css rule and not via a style object.
from react-elastic-carousel.
Related Issues (20)
- Typescript Support HOT 3
- focusOnSelect conflict with enableMouseSwipe HOT 1
- Support with react 18 HOT 11
- Bug in importing {consts} in typescript HOT 6
- Unable to Copy Text in react-elastic-carosuel. HOT 1
- On page load if we have 4 items in carousel then items in carousel shifting to right end. HOT 1
- Wrong type for onChange of ReactElasticCarouselProps HOT 2
- Wrong type in RenderArrow prop document HOT 1
- Typescript Error, but Carousel is working on browser HOT 5
- `rec-slider` not resizing when window height changes HOT 2
- is there support for react 18? HOT 1
- Breakpoints not working properly HOT 2
- Unable to resolve dependency tree after React 18 update. HOT 1
- If enableAutoPlay is enabled then after last item it should move to first item HOT 1
- Buttons are not having discernible text. HOT 5
- Peer Dependency Issue with React 18
- Can you resolve peer dependency issue with react 18.There is ongoing project with react 18 so can you resolve the peer dependency with react 18. HOT 10
- Always show the three dots HOT 1
- the ReactElasticCarousel not have Children's props HOT 5
- Issues with peer dependencies
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-elastic-carousel.