hide advanced icon if all the fields aren't advanced
This commit is contained in:
parent
69c7bbb0a9
commit
11b82aa556
1 changed files with 5 additions and 2 deletions
|
|
@ -12,7 +12,6 @@ import { NodeDataType } from "../../types/flow";
|
||||||
import { alertContext } from "../../contexts/alertContext";
|
import { alertContext } from "../../contexts/alertContext";
|
||||||
import { PopUpContext } from "../../contexts/popUpContext";
|
import { PopUpContext } from "../../contexts/popUpContext";
|
||||||
import NodeModal from "../../modals/NodeModal";
|
import NodeModal from "../../modals/NodeModal";
|
||||||
import { relative } from "path";
|
|
||||||
|
|
||||||
export default function GenericNode({
|
export default function GenericNode({
|
||||||
data,
|
data,
|
||||||
|
|
@ -74,7 +73,11 @@ export default function GenericNode({
|
||||||
</div>
|
</div>
|
||||||
<Cog6ToothIcon
|
<Cog6ToothIcon
|
||||||
className={classNames(
|
className={classNames(
|
||||||
Object.keys(data.node.template).length < 1 ? "hidden" : "",
|
Object.keys(data.node.template).some(
|
||||||
|
(t) => data.node.template[t].advanced===true
|
||||||
|
)
|
||||||
|
? ""
|
||||||
|
: "hidden",
|
||||||
"w-6 h-6 dark:text-gray-500 hover:animate-spin"
|
"w-6 h-6 dark:text-gray-500 hover:animate-spin"
|
||||||
)}
|
)}
|
||||||
></Cog6ToothIcon>
|
></Cog6ToothIcon>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue