Comments (10)
Ok , Thank you @yifaneye . Will try to do this.
from react-gallery-carousel.
Hi @AnmolChhabra98 ! Thank you for bringing this issue up! 😄
If you mean the index of every slide, you can put your slides in an array and then use slides.map((slide, index) => {});
. 😉
If you mean the index of the current slide, you can pass a callback function to onIndexChange
. Please see
from react-gallery-carousel.
@yifaneye Thanks for your response . Yes , please update the documentation as it will be easy to understand then understanding from the code itself.
I tried onIndexChange argument but the problem with this is if you have hasDotButtons and you click on the same index or dot button of an image which identifies the same index . onIndexChange will trigger for this case also but it should not I guess because you are on the same index.
from react-gallery-carousel.
Steps to reproduce :
- Use hasDotButtons in your component.
- Click on the present dot button.
- Your onIndexChange will trigger instead of change in the Index.
from react-gallery-carousel.
Hi, @AnmolChhabra98 !
I think I get what you mean. The onIndexChange
prop currently is called regardless of whether index value's before and after are the same. I will see what I am able to improve it this week.
from react-gallery-carousel.
Thanks @yifaneye It would be great .
Can you please also tell me . Is it possible to use text , photos , videos in a single component
eg: Text slide then some photos slide and then a video slide ?
from react-gallery-carousel.
Hi @AnmolChhabra98 !
Currently, the children
prop is served as an option for "user-managed" slides. Since I believe that developer users may have their own element to be placed in each slide. Please see https://github.com/yifaneye/react-gallery-carousel#q-how-to-place-video-text-or-any-element-into-a-slide.
from react-gallery-carousel.
Thanks @yifaneye for this info and for your wonderful package .
Can you please guide me how can I toggle between object-fit value on minimized and maximized slide ? I am using user managed slides now the way you told me in above comment . I have tried toggleIsMaximized() . I am using this carousel component in one of my functional component. It would be a great help if I am able to do this .
from react-gallery-carousel.
Hi @AnmolChhabra98 !
Thank you for your appreciation! You can define an isMaximized
state and pass it down to both the carousel component and your img
element. When you pass to your img
element, you can have a different object-fit
value as style
based on the isMaximized
state (or isMaximized
prop depending on whether you break down your components). Hope this helps!
from react-gallery-carousel.
No worries @AnmolChhabra98
from react-gallery-carousel.
Related Issues (20)
- Invalid or unexpected token HOT 8
- Issues lazy loading images in gallery HOT 9
- How to use array of photos in carousel user managed slide ? HOT 1
- Allow thumbnails to be at the side HOT 4
- Carousel Button Titles HOT 2
- Typo: minIcon Typescript type is not accepted by Carousel Component HOT 5
- The component can't be used in a TS React project HOT 1
- Npm install doesnt work currently HOT 3
- npm install doesnt work on react-gallery-carousel/example/ HOT 3
- Cant make this module work HOT 4
- shouldMaximizeOnClick doesn't work HOT 2
- Add option for scroll bar for thumbnails HOT 3
- shouldSwipeOnMouse block onTap handler HOT 3
- Maximize and minimize using soft touch on trackpad HOT 5
- Transitions aren't working HOT 1
- Slides that have an a-tag inside them aren't clickable on mobile HOT 1
- Expose a prop to allow a custom placeholder image HOT 8
- Only show the first image HOT 4
- Pause on Hover HOT 2
- Pictures don't appear properly when sliding
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-gallery-carousel.