feat: smart tooltip in datasourcepanel (#18080)

This commit is contained in:
Yongjie Zhao
2022-02-07 22:48:23 +08:00
committed by GitHub
parent 299635c580
commit aa21a963a6
9 changed files with 318 additions and 72 deletions

View File

@@ -210,6 +210,7 @@ function ExploreViewContainer(props) {
const [showingModal, setShowingModal] = useState(false);
const [isCollapsed, setIsCollapsed] = useState(false);
const [shouldForceUpdate, setShouldForceUpdate] = useState(-1);
const theme = useTheme();
const width = `${windowSize.width}px`;
@@ -526,9 +527,10 @@ function ExploreViewContainer(props) {
/>
)}
<Resizable
onResizeStop={(evt, direction, ref, d) =>
setSidebarWidths(LocalStorageKeys.datasource_width, d)
}
onResizeStop={(evt, direction, ref, d) => {
setShouldForceUpdate(d?.width);
setSidebarWidths(LocalStorageKeys.datasource_width, d);
}}
defaultSize={{
width: getSidebarWidths(LocalStorageKeys.datasource_width),
height: '100%',
@@ -559,6 +561,7 @@ function ExploreViewContainer(props) {
datasource={props.datasource}
controls={props.controls}
actions={props.actions}
shouldForceUpdate={shouldForceUpdate}
/>
</Resizable>
{isCollapsed ? (