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

Multiple SketchField components #5

Closed
winfried-van-loon opened this issue Aug 30, 2016 · 6 comments
Closed

Multiple SketchField components #5

winfried-van-loon opened this issue Aug 30, 2016 · 6 comments

Comments

@winfried-van-loon
Copy link

winfried-van-loon commented Aug 30, 2016

Hi! Is it possible to support multiple SketchField components?
Currently, it seems like the second one does not get initialized.

class SketchFieldDemo extends React.Component {
     render() {
        return (
            <div>
                 <SketchField width='1024px' 
                              height='768px' 
                              tool={Tools.Pencil} 
                              color='black'
                              lineWidth={3}/>
                 <SketchField width='1024px' 
                              height='768px' 
                              tool={Tools.Pencil} 
                              color='black'
                              lineWidth={3}/>
            </div>
        )
     }
}
@bolist
Copy link

bolist commented Aug 30, 2016

Hi @patatjenl thanks for trying it out. I just launch it with two sketch fields and everything works normally.. Can you give me some details, an error at the console maybe to help me?

There is an example folder to try it out yourself if you like, just follow the instructions to run the example (https://github.com/tbolis/react-sketch#examples)
Thx

@winfried-van-loon
Copy link
Author

I've tried the same in the example folder files and it works perfectly, which means it has to be a problem in my code, somewhere. Thank you for the quick response, if I've got any further trouble I'll reopen the issue.

@tbolis
Copy link
Owner

tbolis commented Aug 30, 2016

super!
Thx @patatjenl

@winfried-van-loon
Copy link
Author

To share my solution to this problem: After looking through the project files for the solution, I checked the packages. As Material-UI started giving the interesting Warning: Unknown prop notices, I never updated the React package. After I did, React-Sketch worked as expected. 👍

@yadavendra15
Copy link

Hey @winfried-van-loon,

I'm getting the same issue with the MUI tabs.
And it seems like the whiteboard is not initialised..

Its shows me width and height 0, looks like the whiteboard is not rendered.

Please can you help me with my code in codesandbox
https://codesandbox.io/s/goofy-wozniak-hyy8k?file=/src/LLWhiteBoardTabs.js

@winfried-van-loon
Copy link
Author

Sorry, I cannot help, it is way too long ago. Please, open a new issue.

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

4 participants