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

add the react-tap-event-plugin for the Tap error? #11

Closed
narocath opened this issue Sep 20, 2017 · 5 comments
Closed

add the react-tap-event-plugin for the Tap error? #11

narocath opened this issue Sep 20, 2017 · 5 comments

Comments

@narocath
Copy link

As mentioned in material ui here, I had problem with Tabs component. Can you suggest a workaround, (noob in cljs) how I could load it from nodejs/require ... and how to load it before render?

@DaveWM
Copy link
Owner

DaveWM commented Sep 20, 2017

You shouldn't need the tap event plugin any more, it was removed in material ui 0.19.0 (see here). What's the exact problem you're having with the Tabs component?

@narocath
Copy link
Author

When I try to pass on Tabs a {:value @tab :on-change #(reset! tab (-> % .-target .-value)} I get "Uncaught TypeError: Cannot read property 'value' of undefined....
at Object.test3_front.core.root_component [as requestChange]....
at Object.Tabs._this.handleTabTouchTap [as onClick]....
at Object.Tab._this.handleTouchTap [as onClick]....
at EnhancedButton._this.handleTouchTap ....
at Object.ReactErrorUtils.invokeGuardedCallback....
at executeDispatch...
at Object.executeDispatchesInOrder...
at executeDispatchesAndRelease.....
at executeDispatchesAndReleaseTopLevel....
at Array.forEach (native)" when I try to click other Tab and print the value of current Tab from props

@DaveWM
Copy link
Owner

DaveWM commented Sep 20, 2017

I think the problem is that the value passed to the :on-change handler is just the value of the tab, not an event. At least that's what it looks like in the material ui docs. Can you try changing your code to: {:value @tab :on-change #(reset! tab %)} and see if that works?

@narocath
Copy link
Author

Yup that did the trick!! Thank you m8 stupid from me, it was late I guess :)

@DaveWM
Copy link
Owner

DaveWM commented Sep 20, 2017

haha no worries, glad I could help :)

@DaveWM DaveWM closed this as completed Sep 20, 2017
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