gpt4 book ai didi

javascript - 如何在单选组 extjs 中禁用多选

转载 作者:数据小太阳 更新时间:2023-10-29 04:30:18 25 4
gpt4 key购买 nike

我在带有 3 个单选按钮的 extjs 面板中有一个单选组组件。但是我可以一次选择多个 rediobuttons,而 radiogroups 应该只允许选择一个。它应该是默认行为。

我在 radiogroup 组件中找不到任何配置属性来禁止多选。

有什么方法可以在 extJs 的单选组中禁用多选。

最佳答案

配置在radio下面。单选组下的每个单选按钮都应具有相同的名称。看看下面的代码。

xtype: 'radiogroup'
,fieldLabel: 'Sample radiogroup'
,items: [
{boxLabel: 'Item 1', name: 'same-name', inputValue: 1}
,{boxLabel: 'Item 2', name: 'same-name', inputValue: 2, checked: true}
,{boxLabel: 'Item 3', name: 'same-name', inputValue: 3}
,{boxLabel: 'Item 4', name: 'same-name', inputValue: 4}
,{boxLabel: 'Item 5', name: 'same-name', inputValue: 5}
]

关于javascript - 如何在单选组 extjs 中禁用多选,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12068402/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com