Question

I have built connected web parts between Document Library and File Viewer. On selection of document check box it is opening the selected document in File Viewer web part.

enter image description here

When I click on Document Name it is opening the file in new browser.

Is it possible to restrict the redirection and just show the content in the File Viewer web part only?

enter image description here

No correct solution

OTHER TIPS

This is the excepted behavior for the document library Name column, since it is linked to document with edit menu:

enter image description here

As a workaround, we could use column formatting to make the Name field in current library not redirect when clicked once:

{
   "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
   "elmType": "a",
   "txtContent": "@currentField",
   "attributes": {}
}

Simple test:

enter image description here

Note that if you double-click the name, it will still open the document in the browser.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top