[英]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.