This components handles resizing of textarea, when amount of lines in text changes. It also provides Escape and Enter operations. It will be used later for the editing GUI.
Details
- Reviewers
michal inka - Commits
- rCOMM00274d8b7687: [web] Added ChatInputTextArea component
Used component, checked if the height is adjusted correctly, checked if key operations work.
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
web/chat/chat-input-text-area.react.js | ||
---|---|---|
14 ↗ | (On Diff #26488) | Why do we need both BaseProps and Props? They appear to be identical |
18 ↗ | (On Diff #26488) | In general, we tend to use function components when making a new component. Class components do have some advantages – in particular, the fact that callbacks don't always need to be recomputed. Can you explain a bit more why you chose to use a class component here? |
107 ↗ | (On Diff #26488) | Why don't you just pass ChatInputTextArea in here? What's the point of ConnectedChatInputBar? (Also ConnectedChatInputBar appears to be misnamed) |
web/chat/chat-input-text-area.react.js | ||
---|---|---|
53–56 | Is this supposed to happen only at the first render? If yes, I feel like leaving the dependency array empty and silencing the eslint error makes it more explicit. |
web/chat/chat-input-text-area.react.js | ||
---|---|---|
53 ↗ | (On Diff #26638) | Not a big deal, but we usually do React.useEffect for this |