Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-bootstrap-chat-ui",
"version": "0.0.9",
"version": "0.0.10",
"description": "UIkit for chat application using react and bootstrap",
"main": "dist/bundle/cjs/react-bootstrap-chat-ui.min.js",
"module": "dist/esm/index.js",
Expand Down
7 changes: 7 additions & 0 deletions src/ChatInput/ChatInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ function ChatInput(props) {
}
};

const onKeyDown = (e) => {
if (e.code === 'Enter') {
onClick();
}
};

return (
<div
className={
Expand Down Expand Up @@ -46,6 +52,7 @@ function ChatInput(props) {
aria-label="ChatInput"
value={value}
onChange={(e) => setValue(e.target.value)}
onKeyDown={onKeyDown}
/>
<div className="input-group-append">
<button type="button" disabled={activeChannelId <= 0} className="btn btn-primary" onClick={onClick}>
Expand Down