madhushreeag commented on code in PR #41079:
URL: https://github.com/apache/superset/pull/41079#discussion_r3534134938
##########
superset-frontend/src/dashboard/components/DashboardGrid.tsx:
##########
@@ -170,16 +187,21 @@ class DashboardGrid extends PureComponent<
handleResizeStart(): void {
this.setState(() => ({
isResizing: true,
+ rowGuideTop: null,
}));
}
handleResize(
_event: MouseEvent | TouchEvent,
- _direction: string,
- _elementRef: HTMLElement,
+ direction: string,
+ elementRef: HTMLElement,
_delta: { width: number; height: number },
): void {
- // no-op: resize position is tracked via getRowGuidePosition
+ if (direction.toLowerCase().includes('bottom')) {
+ this.setState(() => ({
+ rowGuideTop: this.getRowGuidePosition(elementRef),
+ }));
+ }
Review Comment:
Added onResize to the mock DashboardComponent and added test cases verifying
the row guide renders on bottom-direction resize and clears on resize stop.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]