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

Slider doesnt work in range mode #16533

Closed
1 task
shlomya opened this issue May 12, 2019 · 15 comments
Closed
1 task

Slider doesnt work in range mode #16533

shlomya opened this issue May 12, 2019 · 15 comments
Assignees
Labels
🤔 Need Reproduce We cannot reproduce your problem

Comments

@shlomya
Copy link

shlomya commented May 12, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

https://codepen.io/pen/?editors=0010

Steps to reproduce

Using the forked version in the link above doesn't reproduce it, but when I use it in local without any additional code it happens every time:

  1. Install antd version 3.17.0
  2. Use Slider component in range mode like that:
    <Slider range defaultValue={[40, 80]} />

What is expected?

See range slider like in the link above

What is actually happening?

I got an error:
value.map is not a function
TypeError: value.map is not a function
at ComponentEnhancer.Range (http://localhost:9009/vendors~main.31662cff02dc9c5f86e8.bundle.js:279050:24)
at new ComponentEnhancer (http://localhost:9009/vendors~main.31662cff02dc9c5f86e8.bundle.js:280062:186)
at constructClassInstance (http://localhost:9009/vendors~main.31662cff02dc9c5f86e8.bundle.js:314180:18)
at updateClassComponent (http://localhost:9009/vendors~main.31662cff02dc9c5f86e8.bundle.js:317506:5)
at beginWork (http://localhost:9009/vendors~main.31662cff02dc9c5f86e8.bundle.js:318463:16)
at performUnitOfWork (http://localhost:9009/vendors~main.31662cff02dc9c5f86e8.bundle.js:322131:12)
at workLoop (http://localhost:9009/vendors~main.31662cff02dc9c5f86e8.bundle.js:322171:24)
at renderRoot (http://localhost:9009/vendors~main.31662cff02dc9c5f86e8.bundle.js:322254:7)
at performWorkOnRoot (http://localhost:9009/vendors~main.31662cff02dc9c5f86e8.bundle.js:323161:7)
at performWork (http://localhost:9009/vendors~main.31662cff02dc9c5f86e8.bundle.js:323073:7)

Environment Info
antd 3.17.0
React react
System osx
Browser chrome Version 74.0.3729.131 (Official Build) (64-bit)
@ztplz
Copy link
Contributor

ztplz commented May 12, 2019

Could you create a mini repo? So hard to look into without reproduce.

@shlomya
Copy link
Author

shlomya commented May 12, 2019

If you try it locally it works for you?

@ztplz
Copy link
Contributor

ztplz commented May 12, 2019

At least the demo work for me. https://codesandbox.io/s/znky6v3jrl Let me test it locally.

@shlomya
Copy link
Author

shlomya commented May 12, 2019

Thanks! If it will work for you locally I will try again to reproduce it online

@ztplz
Copy link
Contributor

ztplz commented May 12, 2019

image
I copied the code to the local, it still works for me. If you can't reproduce the problem online, it's best to build a mini repo.

@shlomya
Copy link
Author

shlomya commented May 12, 2019

Thanks to your test, I understood the issue happens only in the Storybook. I believe you will success to reproduce it like that.
Do you think it's in your hands or theirs?

@afc163
Copy link
Member

afc163 commented May 12, 2019

We can't fix it if we don't know how to reproduce it.

@shlomya
Copy link
Author

shlomya commented May 12, 2019

It happens when you use the slider exactly the same but not in the App as you did but if you put the same slider code in stories file and view it using storybook UI

@ztplz
Copy link
Contributor

ztplz commented May 12, 2019

@shlomyba I tend to be a problem with the storybook because I can't reproduce it in codepen, codesandbox and app. If it works in other use cases but can't work on the storybook, it should be a problem with the storybook.

@shlomya
Copy link
Author

shlomya commented May 12, 2019

@ztplz Ok, thanks a lot!

@afc163 afc163 added the 🤔 Need Reproduce We cannot reproduce your problem label May 13, 2019
@ant-design-bot
Copy link
Contributor

Hello @shlomyba. Please provide a online reproduction by forking this link https://u.ant.design/codesandbox-repro or a minimal GitHub repository. Issues labeled by Need Reproduce will be closed if no activities in 7 days.

你好 @shlomyba, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 此处 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。7 天内未跟进的 issue 将会被自动关闭。

@ant-design-bot
Copy link
Contributor

This issue is closed because it has been marked as Need Reproduce, but has not had recent activity.
If you can provide a reproduce, feel free to ping anyone of our maintainers to reopen this issue.
Thank you for your contributions.

@swapnilingle15
Copy link

swapnilingle15 commented Jan 16, 2020

@ant-design-bot @chenshuai2144 @ztplz @shlomyba I'm getting the same issue when I tried to map ant.design Range Slider component with redux-form. I also able to reproduce the issue https://codesandbox.io/s/modest-glitter-6ufyx?fontsize=14&hidenavigation=1&theme=dark

@yoyo837
Copy link
Contributor

yoyo837 commented Jan 16, 2020

@swapnilingle15 It doesn't work. Pls feel free to open a new issue about this.

@imsushree
Copy link

Did anyone faced this issue with storybook, for me when I use this component in stories file, my slider is stuck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤔 Need Reproduce We cannot reproduce your problem
Projects
None yet
Development

No branches or pull requests

8 participants