Skip to content
New issue

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

Wrong initial item width #60

Closed
TornjV opened this issue Mar 24, 2017 · 1 comment
Closed

Wrong initial item width #60

TornjV opened this issue Mar 24, 2017 · 1 comment

Comments

@TornjV
Copy link

TornjV commented Mar 24, 2017

The problem seems to be identical to this one.

I'm using the react component. Trying to run swipe.instance.setup() in componentDidMount does not work since it's undefined, only when the page completely renders is when setup() can be called and does what it's supposed to do. The width seems to be correct on mobile though.

@monteiz
Copy link

monteiz commented Aug 20, 2017

hi @TornjV,
I worked around that by doing the following:

	componentDidMount() {
		this.mySwipe = this.refs.swipe.instance;
	}

	componentDidUpdate() {
		this.mySwipe.setup();
	}

@TornjV TornjV closed this as completed Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants