简体   繁体   English

我怎样才能让“其他”变成一个按钮,用户可以在其中输入任意数量的钱?

[英]How can I have where the 'other' turns into a button where the user can input as much money as they want?

How can I have where the 'other' turns into a button where the user can input as much money as they want?我怎样才能让“其他”变成一个按钮,用户可以在其中输入任意数量的钱? I tried creating a const other with a button and putting {other} in the options tab like this options={['$5', '$10', '$20', '$50', '$100', {other}]} but that did not work.我尝试使用按钮创建一个 const other 并将 {other} 放在选项选项卡中,例如 options={['$5', '$10', '$20', '$50', '$100', {other}]} 但是那没有用。 I am Using Grommet UI, Any suggestions are appreciated.我正在使用 Grommet UI,欢迎提出任何建议。 Thank You.谢谢你。

           <RadioButtonGroup direction="row" required
           gap="xlarge"
           id="example2-id"
           name="example2"
           options={['$5', '$10', '$20', '$50', '$100', 'other']}
           />

Radiobuttons return a preset value, if you want to allow the user to input a custom value I suggest adding a TextInput under your Radiobutton and wrap it in a form.单选按钮返回一个预设值,如果您想允许用户输入自定义值,我建议在您的单选按钮下添加一个 TextInput 并将其包装在一个表单中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在弹出窗口中输入我的电子邮件ID作为输入? - How to have a popup with a field where I can take email id as input? 如何从用户那里获取输入(他们将输入链接)并将其存储在按钮内并重定向? - How can I get input(they will input a link) from user and store it inside of a button and have it redirect? 如何找到用户单击折线的位置? - How can I find where a user has clicked on a Polyline? 我正在尝试单击按钮功能,用户可以直接从 UI 下载文件 - I am trying click button feature where user can download file directly from the UI React-joyride - 如何自定义 Joyride 以显示在我想要的位置? - React-joyride - How can I customize the Joyride to appear where I want to? 如何使用按钮更改我网站上材料 UI 的主题? 这是我到目前为止的地方 - How can I use a button to change the Theme for material UI on my site? this is where I am so far 我如何在 firebase 中使用 .where? - How can i use .where in firebase? 在 React 中,我可以使用 history.goBack() 检查用户将在哪里 go - In React, can I check where the user will go with history.goBack() 我在按钮内有一个图标,我希望当用户单击该图标时,按钮分配器将不再可见 - I have a icon within the button , I want that when user click that icon the button disapper in other words it shoulb not be visible anymore 我有一个带有5个组件的React js页面。 我想通过单击按钮来更改文本内容。 我该怎么做? - I have a react js page with 5 components inside. I want to change the text contents by clicking a button. How can I do it?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM