Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use custom child component rather Agenda/Timeline while using CalendarProvider #2445

Open
gfhfhoo opened this issue Apr 7, 2024 · 1 comment

Comments

@gfhfhoo
Copy link

gfhfhoo commented Apr 7, 2024

Description

I'm trying to replace AgendaList/Timeline compoent into my custom component while using CalendarProvider and ExpandableCalendar.

Expected Behavior

Display my custom compoent after clicking different dates.

Observed Behavior

Nothing happened. The result of debugging looks like CalendarProvider is absolute even if it has been wrapped by View. (therefore the height of View is 0)

The code likes this:

MyCalendar.js

<CalendarProvider
    <ExpandableCalendar theme={calendarStyle} />
    {props.children}
</CalendarProvider>

and HomeScreen.js

<MyCalendar onChanged={(date)=>processDate(date)}>
    <MyList item={data} renderItem={renderItem} />
</MyCalendar>
@gfhfhoo
Copy link
Author

gfhfhoo commented Apr 8, 2024

Addition: a possible "bypass solution" is to add a empty View(setting its height), but I think it is not final solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant