I have a component that is just filling out a lightning-datatable. When opened on a record page, it fills with data specific to that record. This is working as expected. But I would also like to have it fill with all currently active data created by the current user (not record-specific) if it is opened on a home page.
Here is what I am using for when the recordId exists:
@wire(getList,{accId:'$recordId'})
list(result){
morestuff;
}
But when the recordId is undefined, the getList method never runs. Is there a way to easily go about this? Basically the getList function just has a different SOQL query returned based on whether the recordId exists or not. But the function never runs if it doesn't exist (understandable, per the important note in the documentation)