Comments (5)
@lr-mjaouen yeah right now that's probably the best way, this might also be something we want to think about for v2
from stream-chat-react.
Hi @lr-mjaouen right now we don't support this. We're working on v2 of the library and I'll make sure to put this on the list. The easiest way to do this right now is to built your own message component.
from stream-chat-react.
@jaapbakker88 thank you. In order to pass a custom prop in a message and display it in a CustomMessage component what's the best way for the Input? Right now I use a custom handleSubmit function but I can't reset the state once the message sent.
const handleSubmit = async (event: any) => {
event.preventDefault();
const response = await props.channel.sendMessage({
text: event.target.innerHTML,
annotation: currentTime,
});
// does not clear the input
event.target.value = '';
const changeEvent = new Event('change');
event.target.dispatchEvent(changeEvent);
};
Should I use something else?
from stream-chat-react.
(I extended the MessageInput
component, I didn't find an other way to do it)
from stream-chat-react.
https://github.com/GetStream/stream-chat-react/blob/master/src/utils.js
from stream-chat-react.
Related Issues (20)
- Unread message in Channel Review wrong when using channel. sendMessage HOT 9
- bug: missing @babel/runtime dependency in yarn modern with pnp linker HOT 3
- bug: Remove member from group but still active Message HOT 5
- bug: Leave group but still appear in mention list HOT 4
- bug: Can not see message with dash line HOT 1
- bug: sending the very first message breaks virtualized list HOT 6
- bug: peer dependency error with React 16 / React 17 HOT 1
- Soft-Remove Member
- Mention all user HOT 3
- Receive new message notifications from "Thread" when another channel is active HOT 2
- bug: <MessageList/> component creating console Warning: Received `true` for a non-boolean attribute `mine`.
- Hiding Channels Based on channel type using metadata
- Hiding Channels Based on channel type using metadata HOT 2
- Encountering two children with the same key HOT 7
- Unread message notifications do not disappear after reading the message HOT 1
- Unread message notifications do not disappear after reading the message HOT 3
- bug: `unread` on ChannelPreview not updating after muting & unmuting a channel HOT 1
- bug: messageInput autocomplete for emotes (e.g `<3`) sends the message without cleaning the input state HOT 2
- bug: The MessageOptions (triple dot when hovering over a message) requires reverse tabbing for accessibility to select menu items
- bug: Command and Mention popup overlap with play button HOT 1
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 stream-chat-react.