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

Fix disappearing Pagination with lodash 4.14.1 #320

Closed
wants to merge 1 commit into from
Closed

Fix disappearing Pagination with lodash 4.14.1 #320

wants to merge 1 commit into from

Conversation

mcs07
Copy link
Contributor

@mcs07 mcs07 commented Aug 3, 2016

I recently noticed a situation where the Pagination component is always disabled. I think it's an issue with lodash 4.14.1 but not lodash 4.13.1. I traced it to getTotalPages always returning 1. Removing the leading "." from the nested path provided to lodash get seems to fix it, and seems to be fine with lodash 4.13.1 too.

I suspect this is the relevant lodash change: lodash/lodash@c253e8d

@ssetem
Copy link
Member

ssetem commented Aug 3, 2016

wow thanks for digging so deep. I think if the syntax is not backwards compat it might be worth just fixing lodash version now.

@timmetj
Copy link

timmetj commented Aug 9, 2016

I'm also having trouble showing the paginator.. Not sure if this also has something to do with lodash. But i removed the "dot" but still see no paginator. I also updated the npm and typings to lodash v4.14.2 but no result.

@ssetem
Copy link
Member

ssetem commented Aug 9, 2016

yeh this sucks, gonna release a hotfix tonight.

if your using webpack you can correct by doing

npm install lodash@4.13.1 --save

then in webpack add lodash as an alias

alias: {
  react: path.resolve('./node_modules/react'),
  lodash: path.resolve('./node_modules/lodash'),
  ...

@timmetj
Copy link

timmetj commented Aug 9, 2016

Yes, thanks, i idd forgot my alias :( with version 4.13.1 it now works (with or without the "dot")
But this fix doesn't seem to work with lastest lodash version.

@ssetem
Copy link
Member

ssetem commented Aug 9, 2016

yep, I will investigate further with latest lodash, but for now better to stick to 4.13.1

a minor version increase by lodash should not change functionality like this so I will follow up with lodash authors

@joemcelroy
Copy link
Member

fixed in latest beta. Thanks for your PR 👍

@joemcelroy joemcelroy closed this Feb 14, 2017
@mcs07 mcs07 deleted the patch-1 branch February 14, 2017 09:08
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

Successfully merging this pull request may close these issues.

4 participants