المشاريع
عرض على GitHub
jsoendermann/rn-section-list-get-item-layout
حول
:black_square_button: Easy getItemLayout props for react-native SectionLists.
تطوير الويب والتطبيقاتالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- ٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلReact Native SectionList getItemLayout
This package provides a function that helps you construct the getItemLayout function for your SectionLists. For an explanation of why this exists, see this post. It's meant to be used like this:
import sectionListGetItemLayout from 'react-native-section-list-get-item-layout'
class MyComponent extends React.Component {
constructor(props) {
super(props)
this.getItemLayout = sectionListGetItemLayout({
// The height of the row with rowData at the given sectionIndex and rowIndex
getItemHeight: (rowData, sectionIndex, rowIndex) => sectionIndex === 0 ? 100 : 50,
// These four properties are optional
getSeparatorHeight: () => 1 / PixelRatio.get(), // The height of your separators
getSectionHeaderHeight: () => 20, // The height of your section headers
getSectionFooterHeight: () => 10, // The height of your section footers
listHeaderHeight: 40, // The height of your list header
})
}
render() {
return (
<SectionList
{...otherStuff}
getItemLayout={this.getItemLayout}
/>
)
}
}
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…