-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#30 update Reablocks, fix focus on session change #37
Conversation
✅ Deploy Preview for reachat-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
useContext(ChatContext); | ||
const [message, setMessage] = useState<string>(''); | ||
const inputRef = useRef<HTMLTextAreaElement | null>(null); | ||
|
||
useEffect(() => { | ||
if(inputRef && inputRef.current) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inputRef
is a ref so it will always be there - so i don't think you need the if(inputRef
part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will it? it could be null
but i guess you could simplify with inputRef?.current
@@ -1093,3 +1093,106 @@ export const ImageFiles = () => { | |||
</div> | |||
); | |||
}; | |||
|
|||
export const Working = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats this story?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a "working" version - i made it to test the input stuff, but decided it might be useful to have something that functions even as state variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i removed it from the main - we can add it back just needs a better name
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #30
What is the new behavior?
Textarea is now focused on any chance in session including new session being created.
Also, added a sample "working" story for the console
Screen.Recording.2024-08-12.at.8.55.29.PM.mov
Does this PR introduce a breaking change?
Other information