Skip to content

Commit

Permalink
drop root-selector usage
Browse files Browse the repository at this point in the history
  • Loading branch information
diegopf committed May 2, 2024
1 parent 8924f18 commit ca78b79
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</script>

<template>
<MainScroll root-selector="#rootScroll">
<MainScroll>
<ul id="rootScroll" class="list" data-test="scroll">
<MainScrollItem v-for="item in items" :key="item.id" class="item" tag="article" :item="item">
{{ item.id }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</Scroll>
</BaseIdTogglePanel>

<MainScroll root-selector="#main-scroll" class="x-flex x-flex-auto">
<MainScroll class="x-flex x-flex-auto">
<Scroll v-if="hasContent('main-body')" id="main-scroll" class="x-layout__body-scroll">
<section class="x-layout__main-body x-list x-list--vertical">
<!-- @slot Slot that can be used to insert the body content. -->
Expand Down
4 changes: 2 additions & 2 deletions packages/x-components/tests/unit/main-scroll.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function renderMainScroll({
windowScrollingElement,
template = `
<MainScroll v-bind="{ threshold, margin, useWindow }"
root-selector="#rootScroll" class="root-scroll">
class="root-scroll">
<div id="rootScroll" class="container" ${!useWindow ? `data-test="scroll"` : ''}>
<MainScrollItem
v-for="item in items"
Expand Down Expand Up @@ -166,7 +166,7 @@ describe('testing MainScroll component', () => {
const { restoreScrollToItem, getItem } = renderMainScroll({
...defaultParameters,
template: `
<MainScroll v-bind="{ threshold, margin, useWindow }" root-selector="#rootScroll">
<MainScroll v-bind="{ threshold, margin, useWindow }">
<div data-test="main-scroll" id="rootScroll">
<StaggeredFadeAndSlide>
<MainScrollItem
Expand Down

0 comments on commit ca78b79

Please sign in to comment.