-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Input action does not work #2003
Comments
The main idea of this example is to show example markup and way to generate it, it should not be fully functional. For copy text you can you |
To handle click, you need to create your custom "action" button. |
@rhapi You don't need to create a "custom" action button. Seems like you can include an |
For clarity, all shorthand props (like <Input action='My Action' />
<Input action={123} />
<Input action={{ content: 'My Action', onClick: this.handleClick }} />
<Input action={<Button content='My Action' onClick={this.handleClick} />} /> In all cases, the shorthand prop creates a new element. This API and behavior are the same for all shorthand props on all components. |
The example above is one we should include in the shorthand docs for #561 |
Steps to Reproduce
From your documentation from the Inputs section under the "actions" header. The code for copy input to clipboard does not work
Documentation: https://react.semantic-ui.com/elements/input#input-example-action-labeled-button
Expected
When button is clicked, user should expect input is copied into their clipboard and should be able to paste elsewhere
Result
Nothing happens on button click. Nothing is copied into clipboard.
Version
0.71.3
Testcase
Here is the test case that shows the issue: https://codepen.io/philliprognerud/pen/OjwBBv
The text was updated successfully, but these errors were encountered: