When a menu item is selected, e.g highlight, I want to replace show colours to be selected within the same context menu. the defaultMenuItems should be replaced with the highlightMenuItems
const defaultMenuItems = [
{
label: "Tweet",
key: "tweet",
},
{
label: "Save",
key: "save",
},
{
label: "Highlight",
key: "highlight",
},
{
label: "Copy",
key: "copy",
},
];
const highlightMenuItems = [
{
key: "red",
label: "Red",
},
{
key: "green",
label: "Green",
},
{
key: "blue",
label: "Blue",
},
];
return (
<WebView
style={styles.container}
source={{ uri: "; }}
menuItems={defaultMenuItems}
onCustomMenuSelection={handleCustomMenuSelection}
/>
);
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744347404a4569768.html
评论列表(0条)