question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can't get renderRightNav working..

See original GitHub issue

hey,

I have got the following component -

export default class Gallery extends React.Component {
  render() {
    return (
        <div className="gallery" >
        <ImageGallery ref={i => this._imageGallery = i} items={this.props.items}    
        showFullscreenButton={false} showPlayButton={false} showThumbnails={false}  />
        </div>
    );
  }
}

and i tried to add the renderRightNav function since i need to update the state as it pressed and cant figure out where and how to use it. Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tamirhubercommented, Apr 28, 2017

Yes I know. I’ll try to get it to work and be in touch. Thanks again

0reactions
tamirhubercommented, Apr 29, 2017

Ok, so i figured out that as it runs, this._imageGallery is set to null and only after a moment it get the object. And managed to use the renderRightNav, but somehow i cant add custom functions to it without be fired onload. I did -

myRenderRightNav = (onClick, disabled) => {
      var index = this._imageGallery.getCurrentIndex(); // this._imageGallery == null  ???
return (
        <button
          type='button'
          className='image-gallery-right-nav'
          disabled={disabled}
          onClick={onClick, alert("Hello") } // fires onload on NOT onclick..
          aria-label='Next Slide'
        >Hey My own button </button>
      );
    };
Read more comments on GitHub >

github_iconTop Results From Across the Web

React-image-Gallery dependency giving error - Stack Overflow
I am getting error as shown in the image, when i trigger the ImageGallery ... items={this.state.images} renderRightNav = { this.state.
Read more >
React Carousel Image Gallery Component with Thumbnail ...
renderRightNav : Function, custom right nav component ... you're unsure its useful or if it is a major change, please open an issue...
Read more >
[Solved]-GAE Django Table Records Pagination?
renderRightNav ()) return self.separator.join(result) ... Django ManyToManyField get records from related model where not in join table · Can't find Django ...
Read more >
Falcon Sandbox v8.31 © Hybrid Analysis
Submit malware for free analysis with Falcon Sandbox and Hybrid Analysis technology. Hybrid Analysis develops and licenses analysis tools to fight malware.
Read more >
react-image-gallery: Versions - Openbase
Fix bug with swipes not working despite a flick; Lock swiping while slide is transitioning ... renderRightNav : Function, custom right nav component....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found