-
Notifications
You must be signed in to change notification settings - Fork 209
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
Version 0.3.4 seems to have broken the clickable hyperlinks hack. #198
Comments
I had to upgrade aggrid-react. And pure html responses won't work anymore. You'll need to use a cellRenderer. More info: |
Got it. I guess that's unavoidable, so if change can be noted in the documentation the issue can be closed for now. |
I think to get JSX to work I need to import react somewhere - how have you solved it? Otherwise I get syntax errors. To be explicit: js_hyperlinks = JsCode(
"""
function(cell) {
return <a href={cell.value} target="_blank">Click me!</a>;
}
"""
) does not work for me - I get a syntax error telling me "unexpected token < ". |
I'm running into the same problem, and I am sure many others will as well. Is there an "easy" way to turn a hyperlink as a string into something AG Grid will allow to be rendered as a hyperlink? Thanks! |
In the original post, he is using How is that not using a cellRenderer? Your "more info" link is not really helpful for Python programers :'( How do we return "JSX" in Python? Do you know how to fix this? Can you explicitly say what is wrong with the code and how to fix it? Thanks. |
I found my way to this thread as I was researching any leads on this same exact issue. Any ideas would be greatly appreciated. |
@vovavili @VovaViliLox How did you fix it? Can you please show the code changes? |
This is a minimal cell renderer that you should be able to use instead of providing a function to the class BoldCellRenderer {
init(params) {
this.eGui = document.createElement('span');
this.eGui.innerHTML = '<b>'+params.value+'</b>';
}
getGui() {
return this.eGui;
}
} https://plnkr.co/edit/vnQTtGG9k4oMR1Fm?open=index.jsx&preview |
This works, thank you. For reference, my code looks like this:
|
@matkozak Worked for me too, thanks for that! |
@yoeldk I took the awesome solution from @StephenCooper and @matkozak <3 and adjusted it to take some variables
|
I get the error Code:
|
Updating |
It seems that the trick to make links clickable doesn't work anymore in 0.3.4.
The code:
On 0.3.3 - the tab of URLs is populated with 'Click me!'
On 0.3.4 -
<a href="link goes here" target="_blank">Click me!</a>
The text was updated successfully, but these errors were encountered: