Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/responsive-grid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const ResponsiveGrid: React.FC<ResponsiveGridProps> = ({
HeaderComponent = null,
FooterComponent = null,
direction = 'ltr',
removeClippedSubviews = true,
}) => {
const [visibleItems, setVisibleItems] = useState<TileItem[]>([]);

Expand Down Expand Up @@ -239,6 +240,7 @@ export const ResponsiveGrid: React.FC<ResponsiveGridProps> = ({
width: '100%',
}}
showsVerticalScrollIndicator={showScrollIndicator}
removeClippedSubviews={removeClippedSubviews}
>
{/* Render HeaderComponent if provided */}
<View
Expand Down
7 changes: 7 additions & 0 deletions src/responsive-grid/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ export interface ResponsiveGridProps {
* @default ltr
*/
direction?: 'rtl' | 'ltr';

/**
* When true, off-screen child views (whose overflow value is hidden) are automatically removed from the native view hierarchy.
* This can improve performance for long lists, especially on Android when rendering remote images.
* @default true
*/
removeClippedSubviews?: boolean;
}

export interface TileItem {
Expand Down