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

Putting components with callbacks in template. #237

Open
electic opened this issue Apr 10, 2018 · 3 comments
Open

Putting components with callbacks in template. #237

electic opened this issue Apr 10, 2018 · 3 comments

Comments

@electic
Copy link

electic commented Apr 10, 2018

Hi,

I am new to react-templates. How would I put something like this in a template:

<Select name="form-field-name" value={value} onChange={this.handleChange} options={[ { value: 'one', label: 'One' }, { value: 'two', label: 'Two' }, ]} />

When I put this in, it throws an error. Any help appreciated!

@nippur72
Copy link
Contributor

nippur72 commented Apr 10, 2018 via email

@electic
Copy link
Author

electic commented Apr 10, 2018

I tried that. Here is the component I am trying to use:

https://github.com/JedWatson/react-select

@nippur72
Copy link
Contributor

the following

<Select 
        name="form-field-name" 
        value="{value}" 
        onChange="{this.handleChange}" 
        options="{[ { value: 'one', label: 'One' }, { value: 'two', label: 'Two' }, ]}" 
/>

did produce a perfectly valid output in React templates playground.

What error message are you getting?

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