bits-ui 2.8.4 → 2.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -340,6 +340,8 @@ export class CommandRootState {
|
|
|
340
340
|
return;
|
|
341
341
|
if (this.isGrid) {
|
|
342
342
|
const isFirstRowOfGroup = this.#itemIsFirstRowOfGroup(item);
|
|
343
|
+
// ensure item is visible
|
|
344
|
+
item.scrollIntoView({ block: "nearest" });
|
|
343
345
|
if (isFirstRowOfGroup) {
|
|
344
346
|
const closestGroupHeader = item
|
|
345
347
|
?.closest(COMMAND_GROUP_SELECTOR)
|
|
@@ -638,7 +638,7 @@ export class ScrollAreaThumbImplState {
|
|
|
638
638
|
this.opts = opts;
|
|
639
639
|
this.scrollbarState = scrollbarState;
|
|
640
640
|
this.#root = scrollbarState.root;
|
|
641
|
-
this.attachment = attachRef(this.
|
|
641
|
+
this.attachment = attachRef(this.opts.ref, (v) => (this.scrollbarState.scrollbarVis.thumbNode = v));
|
|
642
642
|
$effect(() => {
|
|
643
643
|
const viewportNode = this.#root.viewportNode;
|
|
644
644
|
if (!viewportNode)
|