aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/components/CommentInput/CommentInput.tsx
diff options
context:
space:
mode:
authorSascha <GlancingMind@outlook.com>2021-03-17 17:54:49 +0100
committerSascha <GlancingMind@outlook.com>2021-03-19 17:52:03 +0100
commit9f6c045f8b6e44e47300cec181217906f48d8261 (patch)
tree37098204e3604e0902473dbdb2be9a4e7835efa5 /webui/src/components/CommentInput/CommentInput.tsx
parentc874d111f50dc129a1ac8210beff626eea2f2186 (diff)
downloadgit-bug-9f6c045f8b6e44e47300cec181217906f48d8261.tar.gz
Several fixes
- Fix misspelling of cancel... - Fix flickering of green "update comment" button - Fill input with comment text - Close edit view after submit
Diffstat (limited to 'webui/src/components/CommentInput/CommentInput.tsx')
-rw-r--r--webui/src/components/CommentInput/CommentInput.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/webui/src/components/CommentInput/CommentInput.tsx b/webui/src/components/CommentInput/CommentInput.tsx
index 86cc7dbb..c574538e 100644
--- a/webui/src/components/CommentInput/CommentInput.tsx
+++ b/webui/src/components/CommentInput/CommentInput.tsx
@@ -51,6 +51,7 @@ const a11yProps = (index: number) => ({
type Props = {
inputProps?: any;
+ inputText?: string;
loading: boolean;
onChange: (comment: string) => void;
};
@@ -62,8 +63,8 @@ type Props = {
* @param loading Disable input when component not ready yet
* @param onChange Callback to return input value changes
*/
-function CommentInput({ inputProps, loading, onChange }: Props) {
- const [input, setInput] = useState<string>('');
+function CommentInput({ inputProps, inputText, loading, onChange }: Props) {
+ const [input, setInput] = useState<string>(inputText ? inputText : '');
const [tab, setTab] = useState(0);
const classes = useStyles();