Different type of view in SharePoint document library (Root & Sub Folder)
When we want to have a default view at the root level of the library and different default view for subfolders.
By default, the default view will be applied to the whole document library but when we want to have a different view with its own sorting, filtering, etc. we can use the method below: