nextui icon indicating copy to clipboard operation
nextui copied to clipboard

Pass input value to onContentClick handler

Open peteole opened this issue 3 years ago • 3 comments
trafficstars

I think it would be really convenient to pass the current value of an input field to the onContentClick handler for the use case that the content is a button that should submit the input value. I know there are other ways to solve this but directly passing the value in the handler seems by far the most simple version to me.

peteole avatar Aug 14 '22 07:08 peteole

@peteole is attempting to deploy a commit to the NextUI Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Aug 14 '22 07:08 vercel[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
nextui-storybook ✅ Ready (Inspect) Visit Preview Aug 14, 2022 at 7:53AM (UTC)

vercel[bot] avatar Aug 14 '22 07:08 vercel[bot]

What do you think about it?

peteole avatar Aug 23 '22 17:08 peteole

Hey @peteole I really appreciate your contribution, however, the input value is already being sent through the onChange function, on the other hand, the content element render will probably change once we migrate the input to react-aria, stay tuned 🙌🏼

jrgarciadev avatar Nov 05 '22 02:11 jrgarciadev

Ok, I get it. The idea was that the content would be used as a submit-button and then it would be useful to pass the text to be submitted to the callback. Maybe you can consider this in the migration.

peteole avatar Nov 05 '22 07:11 peteole