Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch中checked属性设置 #1325

Closed
1 task done
Torstentjh opened this issue Feb 21, 2024 · 2 comments
Closed
1 task done

switch中checked属性设置 #1325

Torstentjh opened this issue Feb 21, 2024 · 2 comments
Labels

Comments

@Torstentjh
Copy link

💬 前提强调

  • I have searched the issues of this repository and believe that this is not a duplicate.

🙋 描述详情/重现步骤

image
image
你好,我在使用switch组件时,发现有checked和defaultchecked两个,貌似和文档中说明是一样的,都只能设置默认选中,为了方便观看,我将led灯位置和警报位置的checked设置为一样,还给led灯设置了loading,然后我用第一个按钮控制,测试发现loading和disable都能实现,但是就是无法控制开关的状态,是因为checked和defaultchecked这两个都只能设置默认状态,无法更改吗

💻 运行环境

Android

⚫️ npx react-native info输出信息

System:
OS: Windows 11 10.0.22000
CPU: "(12) x64 AMD Ryzen 5 4600H with Radeon Graphics "
Memory: 3.90 GB / 15.87 GB
Binaries:
Node:
version: 18.12.1
path: E:\tnode\node.EXE
Yarn:
version: 1.22.21
path: E:\tools\nvm\nvm\node_global\yarn.CMD
npm:
version: 8.19.2
path: E:\tnode\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
IDEs:
Android Studio: Not Found
Visual Studio: Not Found
Languages:
Java: 17.0.6
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.6
wanted: 0.72.6
react-native-windows: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: Not found

补充说明

No response

@1uokun
Copy link
Collaborator

1uokun commented Feb 21, 2024

历史设计如此,近期会修改更新

@1uokun
Copy link
Collaborator

1uokun commented Feb 23, 2024

support in 5.1.0

@1uokun 1uokun closed this as completed Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants