Skip to content

Flag disableEditing doesn't do anything in MessageThread #2569

@giulianabaratto

Description

@giulianabaratto

Describe the bug; what happened?
I'm trying to disable message editing by sending the prop disableEditing={true} to MessageThread component. However, the prop doesn't change anything -- the action button is still showing whenever I hover the Message.

Looking at the source code, it seems like the prop is not being passed on to the Message component. There are only 2 references to disableEditing and it's on type definition -- and the props from MessageThread are not passed on to Message directly.

As a last test, I've also tried to run storybook locally and allowing disableEditing to be controlled by the interface -- but I've got the same result. Even when its value is true, action buttons are still showing.

What are the steps to reproduce the issue?
Try setting the disableEditing flag as true in MessageThread component and check if action buttons still appear.

What behavior did you expect?
By setting disableEditing={true}, I expected the action buttons to not appear -- or at least to not allow editing / removing the messages.

If applicable, provide screenshots:
Screenshot of local storybook, with disableEditing set as true:

image

In what environment did you see the issue?

  • @azure/communication-react npm package version (if applicable): 1.3.1

  • @azure/communication-chat npm package version (if applicable): 1.3.0

  • Browser: Google Chrome

  • Browser Version: 107.0.5304.123

Is there any additional information?
I guess not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstable

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions