Open praveengopu0105 opened 6 months ago
Did you resolve this? Im facing the same issue
I bypassed this problem with Partial type. In code it may looks like:
function message(id:string, text:string, position: string):Partial<MessageType>{
return {
position: position,
type: 'text',
text: text,
// date: new Date(),
title: position=="left" ? "AI" : "You" ,
id: id,
titleColor:"black",
forwarded: false,
focus: false,
removeButton : false,
replyButton : false,
//status : "",
notch : true,
retracted : false,
}
}
//example
let messages = [message("0", loremIpsum(), "right") ...];
<MessageList
referance={messageListReferance}
lockable={true}
toBottomHeight={'50%'}
dataSource={messages as MessageType[]}
/>
You can delete any fields in message function and it must be correct.
i didnt know while working with typescript messageBox component asking so many required props but in documentation it having less props so when i just copy paste it is showing props are missing