Skip to content

Commit 060be36

Browse files
authored
feat: Add WaterfallLayout to RAC, and update GridLayout (#7729)
* feat: Add WaterfallLayout to RAC, and update GridLayout * fix TS * fix waterfall layout options * Reuse skeleton nodes * Fix margin on sticky items whose parent overflows fixes S2 table * Accept Layout class instead of requiring manual useMemo * Ignore virtualizer in docs starter * Improve list layout size estimation * Add Tree to list of components supporting virtualization
1 parent a20933c commit 060be36

File tree

28 files changed

+1012
-711
lines changed

28 files changed

+1012
-711
lines changed

packages/@react-aria/virtualizer/src/VirtualizerItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export function layoutInfoToStyle(layoutInfo: LayoutInfo, dir: Direction, parent
8888
...rectStyles
8989
};
9090

91-
if (layoutInfo.isSticky) {
91+
if (layoutInfo.isSticky && !parent?.allowOverflow) {
9292
if (style.top) {
9393
style.marginTop = style.top;
9494
}

packages/@react-spectrum/list/src/ListViewLayout.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
* governing permissions and limitations under the License.
1111
*/
1212
import {InvalidationContext, LayoutInfo, Rect} from '@react-stately/virtualizer';
13-
import {LayoutNode, ListLayout} from '@react-stately/layout';
13+
import {LayoutNode, ListLayout, ListLayoutOptions} from '@react-stately/layout';
1414
import {Node} from '@react-types/shared';
1515

16-
interface ListViewLayoutProps {
16+
interface ListViewLayoutProps extends ListLayoutOptions {
1717
isLoading?: boolean
1818
}
1919

packages/@react-spectrum/listbox/src/ListBoxLayout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {InvalidationContext, LayoutInfo, Rect} from '@react-stately/virtualizer'
22
import {LayoutNode, ListLayout, ListLayoutOptions} from '@react-stately/layout';
33
import {Node} from '@react-types/shared';
44

5-
interface ListBoxLayoutProps {
5+
interface ListBoxLayoutProps extends ListLayoutOptions {
66
isLoading?: boolean
77
}
88

0 commit comments

Comments
 (0)