Skip to content

Commit a30e1bf

Browse files
authored
Fix scroll position jump on mobile for column resize examples (#4646)
examples were too wide on mobile screens causing position jump due to usePreventScroll
1 parent 95e00f8 commit a30e1bf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/@react-spectrum/table/docs/TableView.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ function DroppableTableViewFolder(props: DndTableViewProps) {
10561056
{columnKey => (
10571057
<Cell>
10581058
{item[columnKey]}
1059-
{columnKey === 'type' && item[columnKey] === 'folder' && item.childNodes.length > 0 &&
1059+
{columnKey === 'type' && item[columnKey] === 'folder' && item.childNodes.length > 0 &&
10601060
` (${item.childNodes?.length} dropped item(s)`
10611061
}
10621062
</Cell>
@@ -1163,7 +1163,6 @@ function ReorderableTable() {
11631163
<TableView
11641164
aria-label="Reorderable TableView"
11651165
selectionMode="multiple"
1166-
width="size-5000"
11671166
height="size-3600"
11681167
dragAndDropHooks={dragAndDropHooks}>
11691168
<TableHeader columns={columns}>
@@ -1519,7 +1518,7 @@ Use the `renderPreview` prop to provide a custom drag preview. `keys` and `dragg
15191518

15201519
```tsx example export=true render=false
15211520
import {View} from '@react-spectrum/view';
1522-
1521+
15231522
function CustomDragPreviewExample() {
15241523
let columns = [
15251524
{name: 'Name', id: 'name'},
@@ -1559,7 +1558,6 @@ function CustomDragPreviewExample() {
15591558
<TableView
15601559
aria-label="Draggable TableView example with custom drag preview"
15611560
selectionMode="multiple"
1562-
width="size-5000"
15631561
height="size-3600"
15641562
dragAndDropHooks={dragAndDropHooks}>
15651563
<TableHeader columns={columns}>

0 commit comments

Comments
 (0)