autofocus input fields

This commit is contained in:
erik-sn committed 2020-11-20 22:15:10 -05:00
1 parent e11f3b1148
commit 84919e7104
3 files changed
+5 -3

No files matched your search

@@ -35,6 +35,7 @@ const MessageInput = ({ messageGroupId }: IProps) => {
onChange={e => setMessage(e.target.value)}
placeholder={t("APPS_MESSAGES_NEW_MESSAGE")}
className={classes.input}
inputRef={(input) => input && input.focus()}
inputProps={{
className: classes.messagesInput
}}
@@ -41,6 +41,7 @@ const NewMessageGroupForm = () => {
onChange={e => setParticipants(e.target.value)}
placeholder={t("APPS_MESSAGES_NEW_MESSAGE_GROUP")}
className={classes.newGroupinput}
inputRef={(input) => input && input.focus()}
inputProps={{
className: classes.messagesInput
}}
@@ -13,8 +13,8 @@ export default function MessageSkeleton({ height, isMine = false }) {
const marginLeft = isMine ? '60px' : '8px';
return (
<div className={classes.root} style={{ marginLeft, height: `${height}px` }}>
<Skeleton variant="text" width={325} height={height} />
</div>
<div className={classes.root} style={{ marginLeft, height: `${height}px` }}>
<Skeleton variant="text" width={325} height={height} />
</div>
);
}