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.

AsNavFor doesn't work with version 0.23.0 and higher

See original GitHub issue

I have tried to use the code(from here), but it didn’t sync well. When i downgrade it to 0.21.0, it works great

import React, { Component } from "react";
import Slider from "react-slick";

export default class AsNavFor extends Component {
  constructor(props) {
    super(props);
    this.state = {
      nav1: null,
      nav2: null
    };
  }

  componentDidMount() {
    this.setState({
      nav1: this.slider1,
      nav2: this.slider2
    });
  }

  render() {
    return (
      <div>
        <h2>Slider Syncing (AsNavFor)</h2>
        <h4>First Slider</h4>
        <Slider
          asNavFor={this.state.nav2}
          ref={slider => (this.slider1 = slider)}
        >
          <div>
            <h3>1</h3>
          </div>
          <div>
            <h3>2</h3>
          </div>
          <div>
            <h3>3</h3>
          </div>
          <div>
            <h3>4</h3>
          </div>
          <div>
            <h3>5</h3>
          </div>
          <div>
            <h3>6</h3>
          </div>
        </Slider>
        <h4>Second Slider</h4>
        <Slider
          asNavFor={this.state.nav1}
          ref={slider => (this.slider2 = slider)}
          slidesToShow={3}
          swipeToSlide={true}
          focusOnSelect={true}
        >
          <div>
            <h3>1</h3>
          </div>
          <div>
            <h3>2</h3>
          </div>
          <div>
            <h3>3</h3>
          </div>
          <div>
            <h3>4</h3>
          </div>
          <div>
            <h3>5</h3>
          </div>
          <div>
            <h3>6</h3>
          </div>
        </Slider>
      </div>
    );
  }
}

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:15
  • Comments:9

github_iconTop GitHub Comments

7reactions
ray-sucommented, Nov 29, 2018

and yes, just downgraded to 0.21.0, and it work perfectly

7reactions
ray-sucommented, Nov 29, 2018

same problem here. Looks like the two sliders only sync once after 2 clicks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Releases | NGINX Ingress Controller
Update Go to 1.17 and Go dependencies. FIXES: Fix OpenTracing not working with NGINX Plus. HELM CHART: The version of the Helm chart...
Read more >
Project History — PyOxidizer 0.23.0 documentation
Previous versions of PyOxidizer would not build on Rust 1.56+ due to incompatibilities with an older version of the starlark crate. The crate...
Read more >
Install Kubernetes Using Kubespray (Online) - TechDocs
If SELinux is not working as expected, then disable SELinx: ... Ensure that the Nginx image version is 0.23.0. To change the version:...
Read more >
Tutorial: Release notes - Documentation - Handsontable
Fixed a bug where pasting multiple rows from Excel (below version 16 ) did not work properly. (#5277); Fixed a bug with copying...
Read more >
Deploying and Upgrading (0.23.0) - Strimzi
Strimzi is designed to work on all types of Kubernetes cluster regardless of ... Unlike the Topic Operator, the User Operator does not...
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