0
代码介绍
代码
Issues
Pull Requests
流水线
Actions
讨论
Wiki
项目成员
分析
项目设置
0
  1. ohos_react_native_lcx
  2. /
  3. packages
  4. /
  5. react-native-harmony
  6. /
  7. Libraries
  8. /
  9. Alert
huangyouhuahuangyouhuafix: tertiaryButton onPress is not working
7dd2c358创建于 2025年5月7日历史提交
文件最后提交记录最后更新时间
delegates
fix: tertiaryButton onPress is not working Co-authored-by: zichenyang<zichen834194@163.com> # message auto-generated for no-merge-commit merge: merge fix_alert_button_issue into 0.77.1-rc.1-ohos fix: tertiaryButton onPress is not working Created-by: zichenyang21 Commit-by: zichenyang Merged-by: huangyouhua Description: # Why are these changes being made? tertiary button onPress is not working. # Changelog correct the position of if statement. # Test Plan Run the following demo and observe pressing all buttons would trigger corrresponding log ``` import React from 'react'; import { View, Button, Alert } from 'react-native'; const App = () => { const showAlert = () => { Alert.alert( 'Action Required', 'Please select an action', [ { text: 'OK', onPress: () => console.log('OK button pressed'), }, { text: 'Later', onPress: () => console.log('Later button pressed'), style: 'destructive', }, { text: 'Cancel', onPress: () => console.log('Cancel button pressed'), style: 'cancel', }, ], { cancelable: false } ); }; return ( <View style={{ flex: 1, justifyContent: 'center', padding: 20 }}> <Button title="Show Options" onPress={showAlert} /> </View> ); }; export default App; ``` See merge request: openharmony-sig/ohos_react_native!9101 年前