-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FieldNameRenderer's onClick does not suppress default link behavior #103
Comments
Thanks @JLRishe for posting this one! I'll take a loot at it in next few days |
So, after talking to SharePoint dev team guys I will post an issue on GitHub for them. |
@AJIXuMuK Thank you for looking into this so quickly! |
Hi JL I had customized the FileLeafRef onclick event by means of the standard hello sample finding the same dual clicking behavior you experienced with the oob render. Perhaps modifying the href or target tag to nothing may work. Any guide will be greatly appreciated |
@ralftokada It might be better to open up a separate inquiry since your question is a bit off topic for the issue being reported here. The file I am referring to as "FieldNameCustomizer.tsx" is the boilerplate component file that's created when using |
It looks like I was able to fix it without the bug for Dev Team :) |
@AJIXuMuK That's great! Thank you so much. |
Thanks Alex and JL, Thanks in advance |
Hi @ralftokada , No, it's not. |
Thanks @AJIXuMuK this is planned to be released with the version 1.7.0. |
Category
[ ] Enhancement
[x] Bug
[ ] Question
Version
Please specify what version of the library you are using: [1.6.0]
Expected / Desired Behavior / Question
As indicated in the documentation, I would expect that specifying an
onClick
property on aFieldNameRenderer
would cause the link's default behavior to be suppressed, but it is not. There also doesn't appear to be any API for preventing the link's default behavior (e.g. something analogous toevent.preventDefault()
).Observed Behavior
The function indicated in the
onClick
property does run, but the link's default behavior also executes.Steps to Reproduce
@microsoft/sharepoint
yeoman package to create a new field customizer extension with the name FieldNameCustomizer. When prompted for a framework, select React.import
s:IFieldNameCustomizerProps
interface to:render()
method to:React.createElement(...)
line to:gulp serve --nobrowser
(add customizer GUID here)
portion with the customizer's actual GUID.?loadSPFX=true&debugManifestsFile=https://localhost:4321/temp/manifests.js&fieldCustomizers={"FileLeafRef":{"id":"(add customizer GUID here)","properties":{}}
EXPECTED: "clicked" is logged to the console and nothing else happens
ACTUAL: "clicked" is logged to the console and then the link's default behavior takes place
The text was updated successfully, but these errors were encountered: