Merge branch 'input-answer' into 'staging'
Input answer See merge request frontend/squiz!182
This commit is contained in:
commit
4a72644d92
@ -77,17 +77,16 @@ export const AnswerItem = ({
|
||||
}}
|
||||
>
|
||||
<TextField
|
||||
value={variant.answer}
|
||||
value={inputValue}
|
||||
fullWidth
|
||||
focused={false}
|
||||
placeholder={"Добавьте ответ"}
|
||||
multiline={largeCheck}
|
||||
onChange={({ target }: ChangeEvent<HTMLInputElement>) => {
|
||||
if (target.value.length <= 1000) {
|
||||
const inputValue = target.value;
|
||||
setInputValue(inputValue);
|
||||
setInputValue(target.value);
|
||||
}
|
||||
setQuestionVariantAnswer(inputValue || " ");
|
||||
setQuestionVariantAnswer(target.value || " ");
|
||||
}}
|
||||
onKeyDown={(event: KeyboardEvent<HTMLInputElement>) => {
|
||||
if (disableKeyDown) {
|
||||
@ -177,7 +176,12 @@ export const AnswerItem = ({
|
||||
},
|
||||
}}
|
||||
inputProps={{
|
||||
sx: { fontSize: "18px", lineHeight: "21px", py: 0, ml: "13px" },
|
||||
sx: {
|
||||
fontSize: "18px",
|
||||
lineHeight: "21px",
|
||||
py: 0,
|
||||
ml: "13px",
|
||||
},
|
||||
"data-cy": "quiz-variant-question-answer",
|
||||
}}
|
||||
/>
|
||||
|
@ -36,7 +36,7 @@ export default function UploadImage({ question }: UploadImageProps) {
|
||||
) : (
|
||||
<DropZone
|
||||
text={"5 MB максимум"}
|
||||
heightImg={"110px"}
|
||||
heightImg={"110px"}
|
||||
sx={{ maxWidth: "300px", width: "100%" }}
|
||||
imageUrl={question.content.back}
|
||||
originalImageUrl={question.content.originalBack}
|
||||
|
@ -186,8 +186,7 @@ export const createQuiz = async (navigate: NavigateFunction) =>
|
||||
addQuiz(quiz);
|
||||
setEditQuizId(quiz.backendId);
|
||||
navigate("/edit");
|
||||
|
||||
await createUntypedQuestion(rawQuiz.id);
|
||||
createUntypedQuestion(rawQuiz.id);
|
||||
} catch (error) {
|
||||
devlog("Error creating quiz", error);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user