{"_id":"@bam.tech/react-native-section-list-get-item-layout","_rev":"49-0d817d2e55927e510cbd46c2fb8a7c9e","name":"@bam.tech/react-native-section-list-get-item-layout","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@bam.tech/react-native-section-list-get-item-layout","version":"2.0.0","author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"license":"Apache-2.0","_id":"@bam.tech/react-native-section-list-get-item-layout@2.0.0","maintainers":[{"name":"almouro","email":"alexandrem@bamlab.fr"}],"dist":{"shasum":"e2bc5767c89061818345f7e21e4f4b21c5a429bd","tarball":"https://registry.npmjs.org/@bam.tech/react-native-section-list-get-item-layout/-/react-native-section-list-get-item-layout-2.0.0.tgz","integrity":"sha512-1/TFvX8Ju/7Z6M8gBZJLMFEZYTLZAHUPVJTjL6J5xKCLZKmT2uIKe3KCGe+mCHzyz024Dm80FIrbCXh/x1K/Aw==","signatures":[{"sig":"MEQCICa7AfpGAyTkE2fYvVdgo1Nk3GCW5tDvc8Hkwgc0lmE+AiBPIKTgoAQXRdSALYqNeBVOfWzCxMlCSqEoROOfpPz+ww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./dist/index.js","gitHead":"1e3cd6e613b4c14aaff7e5738c15e54ec1ca78a0","scripts":{"test":"jest","ts:build":"tsc","ts:watch":"tsc --watch","prepublish":"npm run ts:build"},"typings":"./dist/index.d.ts","_npmUser":{"name":"almouro","email":"alexandrem@bamlab.fr"},"_npmVersion":"5.3.0","description":"This package simplifies constructing the getItemLayout prop for react native SectionLists.","directories":{},"_nodeVersion":"8.5.0","devDependencies":{"jest":"^20.0.4","typescript":"^2.3.4"},"_npmOperationalInternal":{"tmp":"tmp/react-native-section-list-get-item-layout-2.0.0.tgz_1509983073824_0.6940738505218178","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-11-06T15:44:34.707Z","modified":"2026-04-14T19:10:39.224Z","2.0.0":"2017-11-06T15:44:34.707Z"},"author":{"name":"Jan Soendermann","email":"jan.soendermann+npm@gmail.com"},"license":"Apache-2.0","description":"This package simplifies constructing the getItemLayout prop for react native SectionLists.","maintainers":[{"email":"tychot@bam.tech","name":"tychota"},{"email":"antoine.thibierge@theodo.com","name":"antoinethib"},{"email":"marekk@bamlab.fr","name":"marekkalnik"},{"email":"yangl@bam.tech","name":"laurence923"},{"email":"remil@bam.tech","name":"remilry"},{"email":"paulb@bam.tech","name":"p0labrd"},{"email":"alexisd@bam.tech","name":"alexisd"},{"email":"thomasre@bam.tech","name":"thomasre"},{"email":"npm@victor.pm","name":"vicprz"},{"email":"pierr.poupin@laposte.net","name":"pierpo"},{"email":"pierrez@bam.tech","name":"pierrezimmermann"},{"email":"hugok@bam.tech","name":"hugok"},{"email":"zyad.alalgui@theodo.com","name":"al.zyad"},{"email":"nicolas.descamps@theodo.com","name":"nicodeck44"},{"email":"julien.izzillo@theodo.com","name":"julienizz"},{"email":"julienc@bam.tech","name":"julienc6"},{"email":"eliott.gandiolle@theodo.com","name":"eliottgdl"}],"readme":"# React Native SectionList getItemLayout\n\nThis package provides a function that helps you construct the `getItemLayout` function for your `SectionList`s. For an explanation of why this exists, see [this post](https://medium.com/@jsoendermann/sectionlist-and-getitemlayout-2293b0b916fb). It's meant to be used like this:\n\n```javascript\nimport sectionListGetItemLayout from 'react-native-section-list-get-item-layout'\n\nclass MyComponent extends React.Component {\n  constructor(props) {\n    super(props)\n\n    this.getItemLayout = sectionListGetItemLayout({\n      // The height of the row with rowData at the given sectionIndex and rowIndex\n      getItemHeight: (rowData, sectionIndex, rowIndex) => sectionIndex === 0 ? 100 : 50,\n\n      // These four properties are optional\n      getSeparatorHeight: () => 1 / PixelRatio.get(), // The height of your separators\n      getSectionHeaderHeight: () => 20, // The height of your section headers\n      getSectionFooterHeight: () => 10, // The height of your section footers\n      listHeaderHeight: 40, // The height of your list header\n    })\n  }\n\n  render() {\n    return (\n      <SectionList\n        {...otherStuff}\n        getItemLayout={this.getItemLayout}\n      />\n    )\n  }\n}\n```\n","readmeFilename":"README.md"}