функция переключения на графы по нажатию на кнопку ветвление(исправлено)
This commit is contained in:
parent
be79f2fc21
commit
9ee2786956
@ -45,15 +45,17 @@ export default function ButtonsOptions({
|
||||
|
||||
const handleClickBranching = (_, value) => {
|
||||
const parentId = question.content.rule.parentId
|
||||
console.log(parentId)
|
||||
if (parentId.length !== 0) {
|
||||
setTimeout(() => updateOpenBranchingPanel(!value), 10)
|
||||
} else {
|
||||
console.log(parentId.length)
|
||||
if (parentId.length === 0 ){
|
||||
return enqueueSnackbar("Вопрос не учавствует в ветвлении")
|
||||
}
|
||||
|
||||
if (parentId === "root")
|
||||
if (parentId === "root") {
|
||||
return enqueueSnackbar("У корня нет условий ветвления")
|
||||
}
|
||||
if (parentId.length !== 0) {
|
||||
setTimeout(() => updateOpenBranchingPanel(!value), 10)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const buttonSetting: {
|
||||
|
@ -55,15 +55,17 @@ export default function ButtonsOptionsAndPict({
|
||||
|
||||
const handleClickBranching = (_, value) => {
|
||||
const parentId = question.content.rule.parentId
|
||||
console.log(parentId)
|
||||
if (parentId.length !== 0) {
|
||||
setTimeout(() => updateOpenBranchingPanel(!value), 10)
|
||||
} else {
|
||||
console.log(parentId.length)
|
||||
if (parentId.length === 0 ) {
|
||||
return enqueueSnackbar("Вопрос не учавствует в ветвлении")
|
||||
}
|
||||
|
||||
if (parentId === "root")
|
||||
if (parentId === "root") {
|
||||
return enqueueSnackbar("У корня нет условий ветвления")
|
||||
}
|
||||
if (parentId.length !== 0) {
|
||||
setTimeout(() => updateOpenBranchingPanel(!value), 10)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user