Skip to content

Commit a175387

Browse files
committed
CalendarList - Passing testID to renderHeader function (#2672)
* Removing renderHeader from calendar with static header * Passing testID to renderHeader function callback * Revert changes to calendar-list/index
1 parent 354c18a commit a175387

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/calendar/header/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export interface CalendarHeaderProps {
5757
/** Apply custom disable color to selected day names indexes */
5858
disabledDaysIndexes?: number[];
5959
/** Replace default title with custom one. the function receive a date as parameter */
60-
renderHeader?: (date?: XDate) => ReactNode; //TODO: replace with string
60+
renderHeader?: (date?: XDate, info?: Pick<CalendarHeaderProps, 'testID'>) => ReactNode; //TODO: replace with string
6161
/** Replace default title with custom element */
6262
customHeaderTitle?: JSX.Element;
6363
/** Test ID */
@@ -204,7 +204,7 @@ const CalendarHeader = forwardRef((props: CalendarHeaderProps, ref) => {
204204
const webProps = Platform.OS === 'web' ? {'aria-level': webAriaLevel} : {};
205205

206206
if (renderHeader) {
207-
return renderHeader(month);
207+
return renderHeader(month, {testID});
208208
}
209209

210210
if (customHeaderTitle) {

0 commit comments

Comments
 (0)