Skip to content

Commit 4233dd1

Browse files
committed
renaming prop to avoid clash with CalendarList prop
1 parent e899265 commit 4233dd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/agenda/reservation-list/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export type ReservationListProps = ReservationProps & {
4545
/** If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make sure to also set the refreshing prop correctly */
4646
onRefresh?: () => void;
4747
/** Extractor for underlying FlatList. Ensure that this is unique per item, or else scrolling may have duplicated and / or missing items. */
48-
keyExtractor?: (item: DayAgenda, index: number) => string;
48+
reservationsKeyExtractor?: (item: DayAgenda, index: number) => string;
4949
};
5050

5151
interface DayAgenda {
@@ -262,7 +262,7 @@ class ReservationList extends Component<ReservationListProps, State> {
262262
};
263263

264264
keyExtractor = (item: DayAgenda, index: number) => {
265-
return this.props.keyExtractor?.(item, index) || `${item?.reservation?.day}${index}`;
265+
return this.props.reservationsKeyExtractor?.(item, index) || `${item?.reservation?.day}${index}`;
266266
}
267267

268268
render() {

0 commit comments

Comments
 (0)