Comments (3)
Thanks, your suggested worked perfectly
from chat-ui-kit-react.
@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:
- New full-size demo with almost all available features.
- 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.
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)
- MessageGroup.Footer with Avatar looks odd
- Expose onKeyPress for MessageInput
- Allow using send button when there is no message text HOT 3
- Scroll to message on browser-native find
- Regarding Chat Reply UI of one another user HOT 1
- IOS 16 version issue of clicking button as Message.CustomContent HOT 3
- Unexpected overflow on ChatContainer HOT 2
- transitionning between the chatcontainer and the sidebar in mobile display HOT 3
- Simple styling with tailwind
- Unexpected width and height change inside components in Message.HtmlContent. HOT 1
- [HELP] How to use the streaming message feature? HOT 4
- Not working on Next.js HOT 4
- Bug: unable to use scroll bar when using custom css HOT 1
- The requested module '/node_modules/prop-types/index.js' does not provide an export named 'default' HOT 1
- Getting started!
- Warning from FontAwesomeIcon about using defaultProps
- Set message input value from another component HOT 1
- Is there a way to actually set a proper max-length for MessageInput? HOT 1
- Avatar isn't displayed when custom content is used
- Sass deprecation warning
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chat-ui-kit-react.