Prevent redirection when clicking on Document Name in Document Library web part
Pregunta
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.
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?
No hay solución correcta
Otros consejos
This is the excepted behavior for the document library Name column, since it is linked to document with edit menu:
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:
Note that if you double-click the name, it will still open the document in the browser.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a sharepoint.stackexchange