Skip to content
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

Error "Cannot set properties of null (setting 'onclick')" #115

Closed
edersong opened this issue Nov 8, 2023 · 9 comments · Fixed by #116
Closed

Error "Cannot set properties of null (setting 'onclick')" #115

edersong opened this issue Nov 8, 2023 · 9 comments · Fixed by #116

Comments

@edersong
Copy link

edersong commented Nov 8, 2023

After the upgrade to v0.7.4, one of my cards are reporting the error Cannot set properties of null (setting 'onclick') even there is no onclick on his code.

image

@MaximeNagel
Copy link

MaximeNagel commented Nov 8, 2023

I have the same problem if I use name: '' in my card, maybe it's the reason for this.

Example:

columns:
- data: entity_picture
align: center
name: ''
icon: mdi:gas-station
modify: '''<img src="'' + x + ''"style="height: 35px;width:100%">'''

I add a space for the name and it works (I want only an icon for my colomn)

columns:
- data: entity_picture
align: center
name: ' '
icon: mdi:gas-station
modify: '''<img src="'' + x + ''"style="height: 35px;width:100%">'''

@JeffCrum1
Copy link

I had HTML TITLE tags on my names to give info on a mouse over.

Once I removed those, the error went away.

@EdLeckert
Copy link
Contributor

The fix for this is in my repo. If you need it sooner or want to help me test it and are in a position to update flex-table-card.js manually, it is here:

https://github.com/EdLeckert/flex-table-card/tree/fix-generate-new-id-for-onclick-error

@MaximeNagel
Copy link

The fix for this is in my repo. If you need it sooner or want to help me test it and are in a position to update flex-table-card.js manually, it is here:

https://github.com/EdLeckert/flex-table-card/tree/fix-generate-new-id-for-onclick-error

It works for me ! Thx for this quick hotfix 😃

@JeffCrum1
Copy link

Did not work in my situation.

Here is the column code that is at issue:

        - name: >-
            <div title="Clinch Indicator:&#10; * : Clinched Best League
            Record&#10; z : Clinched Playoff Birth&#10; x : Clinched
            Division&#10; - : In The Hunt&#10; e : Eliminated">C</div>
          data: entries
          modify: >-
            if(typeof x.stats.find(y=>y.abbreviation == 'CLINCH') !==
            'undefined' ){x.stats.find(y=>y.abbreviation ==
            'CLINCH').displayValue}else{'-'}

If I remove the HTML, it works fine.

Let me know if you need more code for the whole card.

Thanks

@EdLeckert
Copy link
Contributor

@JeffCrum1: What behavior or error are you seeing?

I'm getting the character "C" with the key for "Clinch Indicator" on hover. I don't have the data to make the modify work, but the name works fine for me.

@JeffCrum1
Copy link

JeffCrum1 commented Nov 14, 2023 via email

@JeffCrum1
Copy link

JeffCrum1 commented Nov 23, 2023

So sorry. I didn't realize I needed to delete the .gz file when manually updating.

All good now!

Thanks for your very quick response!!!

@daringer
Copy link
Collaborator

there also is a 0.7.5 release now with all the fixes included...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

5 participants