0

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

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.