Skip to content

Commit

Permalink
revert from onScroll back to onScrollBeginDrag
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaskuh committed Sep 16, 2024
1 parent 11fee06 commit ad61f4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions components/companies/CompaniesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface ICompanyGroup {

type CompaniesListProps = {
openCompanyDetails: (id: number) => void,
onScroll: (event: NativeSyntheticEvent<NativeScrollEvent>) => void,
onScrollBeginDrag: (event: NativeSyntheticEvent<NativeScrollEvent>) => void,
sortedCompanies: PublicCompanyDto[] | null,
}

Expand Down Expand Up @@ -47,7 +47,7 @@ const groupCompanies = (array: PublicCompanyDto[] | null) => {



export default function CompaniesList({openCompanyDetails, onScroll, sortedCompanies}: CompaniesListProps) {
export default function CompaniesList({openCompanyDetails, onScrollBeginDrag, sortedCompanies}: CompaniesListProps) {
const groupedCompanies = groupCompanies(sortedCompanies)

if (!groupedCompanies) {
Expand All @@ -65,7 +65,7 @@ export default function CompaniesList({openCompanyDetails, onScroll, sortedCompa
renderSectionHeader={({section: {title}}) => (
<CompanyListDivider text={title} />
)}
onScroll={onScroll}
onScrollBeginDrag={onScrollBeginDrag}
style={styles.list}
/>

Expand Down
2 changes: 1 addition & 1 deletion screens/companies/CompaniesScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default function CompaniesScreen({ navigation }: companiesNavigation) {
isVisable={modalVisible}
/>

<CompaniesList onScroll={(event) => {if (modalVisible) {toggleFilter()}}} sortedCompanies={sortedCompanies} openCompanyDetails={openCompanyDetails}/>
<CompaniesList onScrollBeginDrag={(event) => {if (modalVisible) {toggleFilter()}}} sortedCompanies={sortedCompanies} openCompanyDetails={openCompanyDetails}/>

</View>
);
Expand Down

0 comments on commit ad61f4f

Please sign in to comment.