Accept a function for CopyButton's value prop #2228
Nantris
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The rationale for this is that the values to be copied could be quite large and not necessarily likely to be copied by the user. Allowing a function to run only when the button is pressed and to use the value it returns would allow users to avoid loading these large values into the app unless the user actually intends to copy the value.
An example situation would be a page with ten copy buttons each that copies some hundreds of lines of code - especially problematic on mobile.
Beta Was this translation helpful? Give feedback.
All reactions