custom-cards / flex-table-card

Highly Flexible Lovelace Card - arbitrary contents/columns/rows, regex matched, perfect to show appdaemon created content and anything breaking out of the entity_id + attributes concept
GNU General Public License v3.0
198 stars 23 forks source link

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

Closed edersong closed 7 months ago

edersong commented 7 months ago

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 commented 7 months ago

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

Example:

columns:

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

columns:

JeffCrum1 commented 7 months ago

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

Once I removed those, the error went away.

EdLeckert commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

@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 commented 7 months ago

Understood Ed. Thanks. I will get you more info later tonight.

I can probably even mock up something to make it work/not work.

On Tue, Nov 14, 2023 at 10:53 AM Ed Leckert @.***> wrote:

@JeffCrum1 https://github.com/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.

— Reply to this email directly, view it on GitHub https://github.com/custom-cards/flex-table-card/issues/115#issuecomment-1810684414, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWTFU5D7VV7H3E5DAZHOC4LYEOOYFAVCNFSM6AAAAAA7CQDMUKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJQGY4DINBRGQ . You are receiving this because you were mentioned.Message ID: @.***>

JeffCrum1 commented 7 months ago

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 commented 7 months ago

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