[Input Text] Proposal to add custom props to the suggestions button
See original GitHub issueExpected Behavior
I want to propose adding the ability to pass props to the suggestions
button that exists in the InputText
component. I wanted to add some attributes to the button or even be able to customize the button based on my existing custom theme for example. I could do it with javascript but wouldn’t be the best way 😃
Actual Behavior
As far as I saw, currently, it’s not possible to customize the suggestions button props in the InputText
component:
URL, screen shot, or Codepen exhibiting the issue
Does that make sense? If so, I’m happy to open a PR doing that 🚀
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Custom input component in react native input is not working ...
Using typescript, import {TextInput, TextInputProps, View} from "react-native";. declare a props interface: interface Props extends ...
Read more >How to customize the file upload button in React - Medium
The solution · Step 1: Make the input element invisible · Step 2: Add a button element that you style to your taste...
Read more >How To Customize React Components with Props
In this tutorial, you'll create custom components by passing props to your component. Props are arguments that you provide to a JSX element....
Read more >Use predictive text on iPhone - Apple Support
As you type text on the iPhone keyboard, Siri predicts your next word, based on your recent activity. Tap the word to enter...
Read more >Hooks FAQ - React
Do Hooks replace render props and higher-order components? ... (If you find yourself doing this often, you could create a custom Hook for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jcfilben thanks for your reply!
I use a tool that collects data for click events, and I want to track clicks in each item of the suggestion list by passing a custom data attribute to the buttons.
I managed to work around it by passing a custom label (similar to what you shared), this way the tool can capture the clicks 👍🏻 - It works for now!
Since I managed to work around it, I’m closing the issue 😄 - thanks!
We do allow custom suggestions, see this storybook example. However, I realize this method doesn’t let you edit the actual button but instead allows you to edit the content of the button. Can you share what you are trying to achieve that cannot be done without editing the button? I’m just trying to better understand the use case