interface IProps {
message: INotifyMsg;
onDeleteMsg?: CommonEventFunction;
disabled?: boolean;
}
handleDelete = (id, title) => {
if (this.props.onDeleteMsg && !this.props.disabled) {
this.props.onDeleteMsg({ id, title });
}
}
Type "{id: any; title: any;}" The parameter of cannot be assigned to a parameter of type "baseeventorigin".
Object text can only specify known attributes, and "Id" is not in the type "baseeventorigin". ts(2345)
<View className="delete-Btn">
{this.props.onDeleteMsg && <Text className="delete" onClick={() =>
this.handleDelete(message.id, message.title)}>delete</Text>}
</View>