Source
force-app/main/default/lwc/navToListView/navToListView.js
Usage
NavigationMixin
Extend your component withNavigationMixin to access navigation capabilities:
PageReference
Set to
standard__objectPage for object pagesThe API name of the object (e.g., ‘Contact’, ‘Account’, ‘Opportunity’)
Set to
list to display the object’s list viewThe API name of the list view to display (e.g., ‘Recent’, ‘AllContacts’, ‘MyContacts’). If omitted, displays the default list view for the object
List View Filters
Common filter names include:Recent- Recently viewed recordsAllContacts- All contacts (object-specific)MyContacts- My contacts (object-specific)- Custom list view API names
Key Features
- Navigate to object list views
- Specify custom list view filters
- Supports all standard and custom objects
- Type-safe navigation with PageReference
