Git Product home page Git Product logo

Comments (3)

Johnne25 avatar Johnne25 commented on July 29, 2024 1

Thanks, your suggested worked perfectly

from chat-ui-kit-react.

supersnager avatar supersnager commented on July 29, 2024

@Johnne25
Thank you for your question.

I am 100% sure that I am doing something wrong, but I can't seem to find any documentation to describe the use of events for the components.

You are not doing anything wrong :) And you have right I should add some more documentation about callbacks (and I will #15 ).

All not documented properties in components are passed down to the main HTML element of the component (unless the documentation state directly otherwise). So your onClick callback is assigned to:

<div class="cs-conversation">

But, this library has nothing to do with your data - it's a UI library. Therefore, I try to give the user the greatest possible freedom and control over their data.

Now if you need to pass your business data like conversation id to the callback you can pass it in this way:

<Conversation key={con${this.props.conversations[index].id}} onClick={() => this.conversationClick(con${this.props.conversations[index].id})}>

Your Demo of the 4 conversation windows is great. Providing the source code for that would probably answer most of the questions I have.

To be honest this demo is a little mess ;) And it's not a good example.
But we are working now on two new things:

  1. New full-size demo with almost all available features.
  2. Some tutorials and about how to write a real application.

Please be patient, we have "a little" work to do with this. It will be available soon.

BTW: I'm planning to do an additional library for handling chat logic (like grouping messages, changing handling conversations, et.c) to allow build chat apps with small effort and faster.

from chat-ui-kit-react.

supersnager avatar supersnager commented on July 29, 2024

BTW: I'm planning to do an additional library for handling chat logic (like grouping messages, changing handling conversations, et.c) to allow build chat apps with small effort and faster.

Here is the library mentioned: https://github.com/chatscope/use-chat

from chat-ui-kit-react.

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.