1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

add scrolling into view for preferences

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-03-15 16:59:11 -04:00
parent f06ba27d97
commit c9237be548

View File

@ -16,6 +16,7 @@ import { Select, SelectOption } from "../select";
import { HelmCharts } from "./helm-charts"; import { HelmCharts } from "./helm-charts";
import { KubectlBinaries } from "./kubectl-binaries"; import { KubectlBinaries } from "./kubectl-binaries";
import { ScrollSpy } from "../scroll-spy/scroll-spy"; import { ScrollSpy } from "../scroll-spy/scroll-spy";
import { navigation } from "../../navigation";
@observer @observer
export class Preferences extends React.Component { export class Preferences extends React.Component {
@ -29,6 +30,12 @@ export class Preferences extends React.Component {
})); }));
} }
componentDidMount() {
const { hash } = navigation.location;
document.getElementById(hash.slice(1))?.scrollIntoView();
}
render() { render() {
const { preferences } = userStore; const { preferences } = userStore;
const header = <h2>Preferences</h2>; const header = <h2>Preferences</h2>;