amaannawab923 commented on code in PR #35984:
URL: https://github.com/apache/superset/pull/35984#discussion_r2511036055
##########
superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx:
##########
@@ -614,7 +619,16 @@ const DashboardBuilder = () => {
</ResizableSidebar>
</>
)}
- <StyledHeader ref={headerRef}>
+ <StyledHeader
+ data-test="dashboard-header-wrapper"
+ ref={headerRef}
+ filterBarWidth={
+ showFilterBar &&
+ filterBarOrientation === FilterBarOrientation.Vertical
+ ? currentFilterBarWidth
+ : 0
+ }
Review Comment:
const filterBarWidth = useMemo(() => {
if (showFilterBar && filterBarOrientation ===
FilterBarOrientation.Vertical) {
return currentFilterBarWidth;
}
return 0;
}, [showFilterBar, filterBarOrientation, currentFilterBarWidth]);
Can we use variable like this outside and pass it here rather than putting
ternary conditions here
--
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]