GithubHelp home page GithubHelp logo

Comments (3)

AaronDDM avatar AaronDDM commented on May 30, 2024

Hey @tudorbertiean,

Thanks for reporting this issue. We're investigating this and will update with more information as soon as we can.

from components.

AaronDDM avatar AaronDDM commented on May 30, 2024

Hey @tudorbertiean ,

So looking into this issue, the mailbox component will not attempt to make a fetch request for thread message bodies if the thread information is passed in via the all_threads prop. So you must include the thread message bodies yourself.

There are however some issues:

  1. There should not be an error (as per your screenshot)
  2. The threadClicked event got dispatched twice

Both of the above two issues have been resolved in #315.

So for your case, you'll have to do either:
(a) pass in all_threads with full message bodies
(b) use the threadClicked and messageClicked dispatched events to identify the thread & message clicked and hydrate them accordingly with the message bodies.

For example:

        mailbox.addEventListener("threadClicked", (v) => {
          let { thread } = v.detail;
          thread = {
            ...thread,
            messages: thread.messages.map((m) => {
              m.body = "THIS IS A TEST";
              return m;
            })
          }
        });

This will make it so that each message will have the body "THIS IS A TEST".

from components.

tudorbertiean avatar tudorbertiean commented on May 30, 2024

Great, thanks so much for the quick responses and turnaround @AaronDDM!

from components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.