mirror of
https://gitlab.com/MrFry/qmining-data-editor
synced 2025-04-01 20:24:01 +02:00
Possible answers fix
This commit is contained in:
parent
5cabf0766f
commit
09b2e1a0d0
2 changed files with 12 additions and 5 deletions
|
@ -66,6 +66,13 @@ export default function Question({ question, onChange, index }) {
|
||||||
{possibleAnswers.map((possibleAnswer, i) => {
|
{possibleAnswers.map((possibleAnswer, i) => {
|
||||||
// {"text":"a. Kétismeretlenes egyenletrendszert használunk.",
|
// {"text":"a. Kétismeretlenes egyenletrendszert használunk.",
|
||||||
// "selectedByUser":true}
|
// "selectedByUser":true}
|
||||||
|
|
||||||
|
console.log(possibleAnswer)
|
||||||
|
const pa =
|
||||||
|
typeof possibleAnswer === 'string'
|
||||||
|
? possibleAnswer
|
||||||
|
: possibleAnswer.text
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={i}>
|
<div key={i}>
|
||||||
<div>
|
<div>
|
||||||
|
@ -73,15 +80,15 @@ export default function Question({ question, onChange, index }) {
|
||||||
onChange={() => {
|
onChange={() => {
|
||||||
onChange({
|
onChange({
|
||||||
...question,
|
...question,
|
||||||
A: possibleAnswer.text,
|
A: pa,
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
checked={possibleAnswer.text === question.A}
|
checked={pa === question.A}
|
||||||
value={possibleAnswer.text}
|
value={pa}
|
||||||
type="radio"
|
type="radio"
|
||||||
name={`possiblea${index ? index : ''}`}
|
name={`possiblea${index ? index : ''}`}
|
||||||
/>
|
/>
|
||||||
<span>{possibleAnswer.text}</span>
|
<span>{pa}</span>
|
||||||
</div>
|
</div>
|
||||||
<span
|
<span
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"siteUrl": "https://qmining.frylabs.net/",
|
"siteUrl": "https://qmining.frylabs.net/",
|
||||||
"apiUrl": "http://localhost:8080/",
|
"apiUrl": "https://api.frylabs.net/",
|
||||||
"maxQuestionsToRender": 250
|
"maxQuestionsToRender": 250
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue