fix: property pane if tabledata section doesn't exist, clear widget id (#27260)
This commit is contained in:
parent
7e7df702c2
commit
316ef84a8a
|
|
@ -216,14 +216,18 @@ const WalkthroughRenderer = ({
|
||||||
0 ${targetBounds.bh},
|
0 ${targetBounds.bh},
|
||||||
${multipleHighlightsIds.reduce((acc, id) => {
|
${multipleHighlightsIds.reduce((acc, id) => {
|
||||||
const boundingRect = boundingRects[id];
|
const boundingRect = boundingRects[id];
|
||||||
|
if (boundingRect) {
|
||||||
acc = `${acc} ${boundingRect.tx} ${boundingRect.bh},
|
acc = `${acc} ${boundingRect.tx} ${boundingRect.bh},
|
||||||
${boundingRect.tx} ${boundingRect.ty},
|
${boundingRect.tx} ${boundingRect.ty},
|
||||||
${boundingRect.tx + boundingRect.tw} ${boundingRect.ty},
|
${boundingRect.tx + boundingRect.tw} ${boundingRect.ty},
|
||||||
${boundingRect.tx + boundingRect.tw} ${
|
${boundingRect.tx + boundingRect.tw} ${
|
||||||
boundingRect.ty + boundingRect.th
|
boundingRect.ty + boundingRect.th
|
||||||
},
|
},
|
||||||
${boundingRect.tx} ${boundingRect.ty + boundingRect.th},
|
${boundingRect.tx} ${
|
||||||
|
boundingRect.ty + boundingRect.th
|
||||||
|
},
|
||||||
${boundingRect.tx} ${boundingRect.bh},`;
|
${boundingRect.tx} ${boundingRect.bh},`;
|
||||||
|
}
|
||||||
return acc;
|
return acc;
|
||||||
}, "")}
|
}, "")}
|
||||||
${targetBounds.bw} ${targetBounds.bh},
|
${targetBounds.bw} ${targetBounds.bh},
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import { setPropertySectionState } from "actions/propertyPaneActions";
|
||||||
import { getIsOneClickBindingOptionsVisibility } from "selectors/oneClickBindingSelectors";
|
import { getIsOneClickBindingOptionsVisibility } from "selectors/oneClickBindingSelectors";
|
||||||
import localStorage from "utils/localStorage";
|
import localStorage from "utils/localStorage";
|
||||||
import { WIDGET_ID_SHOW_WALKTHROUGH } from "constants/WidgetConstants";
|
import { WIDGET_ID_SHOW_WALKTHROUGH } from "constants/WidgetConstants";
|
||||||
|
import { PROPERTY_PANE_ID } from "components/editorComponents/PropertyPaneSidebar";
|
||||||
|
|
||||||
const TagContainer = styled.div``;
|
const TagContainer = styled.div``;
|
||||||
|
|
||||||
|
|
@ -149,11 +150,18 @@ export const PropertySection = memo((props: PropertySectionProps) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (widgetId) {
|
if (widgetId) {
|
||||||
|
const isWidgetIdTableDataExist = document.querySelector(
|
||||||
|
`#${PROPERTY_PANE_ID} [id='${btoa(widgetId + ".tableData")}']`,
|
||||||
|
);
|
||||||
|
if (isWidgetIdTableDataExist) {
|
||||||
if (className === "data") {
|
if (className === "data") {
|
||||||
setIsOpen(true);
|
setIsOpen(true);
|
||||||
} else {
|
} else {
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
await localStorage.removeItem(WIDGET_ID_SHOW_WALKTHROUGH);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user