aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/components
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2021-03-24 20:28:06 +0100
committerGitHub <noreply@github.com>2021-03-24 20:28:06 +0100
commitfb6b2d873e1bbc653aa84ddce56c842202e00c33 (patch)
treef722d8ac4381dd770b2cb96bf66478feabc94678 /webui/src/components
parent01b949091290a3bfd5870c6457c941db1abf3d67 (diff)
parentbd6159a25b548f8f939f137b70dcf77a722e70dc (diff)
downloadgit-bug-fb6b2d873e1bbc653aa84ddce56c842202e00c33.tar.gz
Merge pull request #602 from GlancingMind/upstream-4-interface-to-edit-issues
WebUI: Edit comments and inspect edit history
Diffstat (limited to 'webui/src/components')
-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();