Skip to content

messageBox props asking so many props #218

Open

Description

@praveengopu0105

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

Activity

  1. changed the title [-]message props asking so many props[/-] [+]messageBox props asking so many props[/+] on Feb 21, 2024
  2. bhattiasad99 commented on Apr 21, 2024

    @bhattiasad99

    Did you resolve this? Im facing the same issue

  3. Sorbuscorp commented on Apr 22, 2024

    @Sorbuscorp

    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.

  4. george-eucare commented on Apr 11, 2025

    @george-eucare

    same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions