Skip to content

Commit 8191bfb

Browse files
committed
Minor fixes in the README
1 parent cd0cb94 commit 8191bfb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ let end = $state(0); // the index of the last visible item
6161
{#await dataPromise}
6262
Loading...
6363
{:then}
64-
<VirtualTable items={items} class="anyClassIWantToAdd" bind:start bind:end>
64+
<VirtualTable items={items} className="anyClassIWantToAdd" bind:start bind:end>
6565
{#snippet thead()}
6666
<tr>
6767
<th data-sort="title">Title</th>
@@ -88,6 +88,9 @@ let end = $state(0); // the index of the last visible item
8888
{/await}
8989
```
9090

91+
Additionally, you should make sure that you set a height on the parent element of the table,
92+
since it might either (a) collapse, or (b) have a complete height determined by the table rows, not needing to be virtual otherwise.
93+
9194
Pay attention to the `role` attributes: those are highly recommended if you want to have the table behave as such also in accessibility contexts.
9295
While this is not necessarily needed for ordinary tables, this one is required to use `display: block` on the table element (see Development Notes](#development-notes)), which in turn makes these role attributes necessary, still.
9396

0 commit comments

Comments
 (0)