Fixed flow not creating after creating custom component
This commit is contained in:
parent
e6e96b6f96
commit
59ef06ab79
1 changed files with 3 additions and 3 deletions
|
|
@ -52,7 +52,7 @@ export default function ParameterComponent({
|
||||||
const [position, setPosition] = useState(0);
|
const [position, setPosition] = useState(0);
|
||||||
const { setTabsState, tabId, save, flows } = useContext(TabsContext);
|
const { setTabsState, tabId, save, flows } = useContext(TabsContext);
|
||||||
|
|
||||||
const flow = flows.find((f) => f.id === tabId).data.nodes;
|
const flow = flows.find((f) => f.id === tabId).data?.nodes ?? null;
|
||||||
|
|
||||||
// Update component position
|
// Update component position
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -106,7 +106,7 @@ export default function ParameterComponent({
|
||||||
function renderTooltips() {
|
function renderTooltips() {
|
||||||
let groupedObj = groupByFamily(myData, tooltipTitle, left, data.type, flow);
|
let groupedObj = groupByFamily(myData, tooltipTitle, left, data.type, flow);
|
||||||
|
|
||||||
if (groupedObj?.length === 0) {
|
if (groupedObj?.length === 0 && flow && flow.length > 0) {
|
||||||
groupedObj = groupByFamilyCustom(
|
groupedObj = groupByFamilyCustom(
|
||||||
myData,
|
myData,
|
||||||
tooltipTitle,
|
tooltipTitle,
|
||||||
|
|
@ -171,7 +171,7 @@ export default function ParameterComponent({
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
renderTooltips();
|
renderTooltips();
|
||||||
}, [tooltipTitle, flow.length]);
|
}, [tooltipTitle, flow]);
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
ref={ref}
|
ref={ref}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue