Merge branch 'feat/ui-1.0.3' into 'test'
Feat/ui 1.0.3 See merge request opensource/answer!403
This commit is contained in:
@@ -18,7 +18,7 @@ const Index: FC<Props> = ({ visible, siteUrl = '' }) => {
|
||||
<p>
|
||||
<Trans i18nKey="install.ready_description">
|
||||
If you ever feel like changing more settings, visit
|
||||
<a href={`${siteUrl}/users/login`}>admin section</a>; find it in the
|
||||
<a href={`${siteUrl}/users/login`}> admin section</a>; find it in the
|
||||
site menu.
|
||||
</Trans>
|
||||
</p>
|
||||
|
||||
@@ -32,6 +32,7 @@ const Index: FC<Props> = ({ visible = false, data, callback }) => {
|
||||
});
|
||||
const [showEditor, setShowEditor] = useState<boolean>(visible);
|
||||
const [focusType, setForceType] = useState('');
|
||||
const [editorFoucsState, setEditorFoucsState] = useState(false);
|
||||
|
||||
const handleSubmit = () => {
|
||||
if (!formData.content.value) {
|
||||
@@ -84,6 +85,7 @@ const Index: FC<Props> = ({ visible = false, data, callback }) => {
|
||||
const handleFocusForTextArea = () => {
|
||||
setForceType('answer');
|
||||
setShowEditor(true);
|
||||
setEditorFoucsState(true);
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -114,7 +116,7 @@ const Index: FC<Props> = ({ visible = false, data, callback }) => {
|
||||
focusType === 'answer' && 'focus',
|
||||
)}
|
||||
value={formData.content.value}
|
||||
autoFocus
|
||||
autoFocus={editorFoucsState}
|
||||
onChange={(val) => {
|
||||
setFormData({
|
||||
content: {
|
||||
|
||||
Reference in New Issue
Block a user