Skip to content

[3.1.0] (2021-03-15)

Choose a tag to compare

@vishalnarkhede vishalnarkhede released this 15 Mar 13:38
· 1819 commits to master since this release
  • πŸ›‘ BREAKING: Removed a prop handleOnPress on Input component.

  • Added support for new props on Input component, which can be used on Channel component as prop to replace undelying input component (reference)

    • closeAttachmentPicker (function)
    • openAttachmentPicker (function)
    • openCommandsPicker (function)
    • toggleAttachmentPicker (function)
  • Added support for new prop on Channel component - InputButtons, to replace the extra buttons on the left on input box #536

  • Added support for messageActions prop as callback. Also added support for prop messageActions on Channel component #548
    Earlier you could override messageActions prop as following:

    <Channel
      messageActions=[
        {
          action: () => { /** Some message action logic */ };
          title: "Pin Message";
          icon: PinIcon;
          titleStyle: {};
        },
        {
          action: () => { /** Some message action logic */ };
          title: "Delete Message";
          icon: PinIcon;
          titleStyle: {};
        }
      ]
    >
      {/** MessageList and MessageInput component here */}
    </Channel>

    But now, you can selectly keep certain action and remove some:

    /** Lets say you only want to keep threadReply and copyMessage actions */
    <Channel
      messageActions={({
        blockUser,
        copyMessage,
        deleteMessage,
        editMessage,
        flagMessage,
        muteUser,
        reply,
        retry,
        threadReply,
      }) => ([
        threadReply, copyMessage
      ])}
    >
      {/** MessageList and MessageInput component here */}
    </Channel>
  • Issue fix: make OverlayReactions customizable through props. c7a83b8

  • Issue fix: Image upload for expo and assets-library 5a2d0e8

  • Issue fix: Compatibility with jest as described in #508 a172c15