how can I check if a source exists??? QUESTION ABOUT CONDITIONAL RENDERING OF SOURCES IN REACT-ADMIN
Check out my frontend:
Sometimes, the source "dateStart" is stored as:
{
report_request: {
dateStart: 'whatever1'
dateEnd: 'watever2'
}
}
and OTHER TIMES, they are stored as:
{
report_request:
{dates: {
dateStart: 'whatever1'
dateEnd: 'watever2'}
}
}
So I want to tell react-admin like hey.. If you can't get the startDate via source="report_request.dateStart", then try source="report_request.dates.dateStart"
How can I do this in react-admin???