I have an LWC component in which I'm displaying list of records in table format. I've implemented auto save functionality as well. When the current user is working in the component and at the same time some other user has made a change to it. Now I want to alert the current user that some changes have happened to the records by the other user and ask him to refresh the page to see the updated values. How can I capture the changes made by other user in my LWC component. Thanks in advance.
If this is not in lightning communities, you can use the lightning emp api module and subscribe to a channel that will trigger an event if certain fields (to which the channel is registered) are changed.
The Change Data Capture Developer Guide has a complete reference of available modules and approaches you can use for these types of things.