We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when change the size, image is resized
when change the size, nothing happens
import { Gallery } from "react-grid-gallery"; import Lightbox from "react-image-lightbox"; import { Image as IImage } from "react-grid-gallery"; export function GalleryShow({ images }: { images: Partial<GalleryImageItem>[] }) { const [index, setIndex] = useState(-1); const [size, setSize] = useState(120); const currentImage = images[index]; const nextIndex = (index + 1) % images.length; const nextImage = images[nextIndex] || currentImage; const prevIndex = (index + images.length - 1) % images.length; const prevImage = images[prevIndex] || currentImage; const handleClick = (index: number, item: CustomImage) => setIndex(index); const handleClose = () => setIndex(-1); const handleMovePrev = () => setIndex(prevIndex); const handleMoveNext = () => setIndex(nextIndex); let DATA = images.map(e => { return { ...e, width: size, height: size } }) useEffect(() => { DATA = images.map(e => { return { ...e, width: size, height: size } }) console.log(DATA) }, [size]) return ( <div> <input type="range" min={20} defaultValue={size} max={400} step={20} onChange={(e) => { setSize(parseInt(e.currentTarget.value, 10)) }} /> <Gallery images={DATA as GalleryImageItem[]} onClick={handleClick} enableImageSelection={false} /> {!!currentImage && ( <Lightbox mainSrc={currentImage.original!} imageTitle={currentImage.caption} mainSrcThumbnail={currentImage.src} nextSrc={nextImage.original!} nextSrcThumbnail={nextImage.src!} prevSrc={prevImage.original!} prevSrcThumbnail={prevImage.src!} onCloseRequest={handleClose} onMovePrevRequest={handleMovePrev} onMoveNextRequest={handleMoveNext} /> )} </div> ); } ``` link the css too ### Operating system windows 11 ### Browser and version Mozilla - latest ### Hardware
The text was updated successfully, but these errors were encountered:
Hey @c0ncentus, I just published a new version react-grid-gallery@1.0.1. Can you try again, please?
react-grid-gallery@1.0.1
Sorry, something went wrong.
the same issue (my data is updated via console.log and I checked that). the ui seems static
No branches or pull requests
Expected behaviour
when change the size, image is resized
Actual behaviour
when change the size, nothing happens
Steps to reproduce behaviour
The text was updated successfully, but these errors were encountered: