neue Homepage auf react basis

This commit is contained in:
2026-08-07 21:39:30 +02:00
parent 164bdd19ad
commit ee89442c04
52191 changed files with 1230242 additions and 58 deletions
+24
View File
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.focusElement = focusElement;
var _doesSupportPreventScroll = require("./doesSupportPreventScroll");
/**
* Focuses an element while preserving the grid scroll position.
*
* Uses the native `preventScroll` focus option when supported, and otherwise
* restores the scroll position manually after focusing.
*/
function focusElement(element, apiRef) {
if ((0, _doesSupportPreventScroll.doesSupportPreventScroll)()) {
element.focus({
preventScroll: true
});
} else {
const scrollPosition = apiRef.current.getScrollPosition();
element.focus();
apiRef.current.scroll(scrollPosition);
}
}