komarovalexander / ka-table

Lightweight MIT React Table component with Sorting, Filtering, Grouping, Virtualization, Editing and many more

Home Page:http://ka-table.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with id not being unique

philecker opened this issue · comments

I currently have an issue with having the ID of my TH being the same as a ID of my form inputs. I can't change the ids of my form, so I'm wondering if there is the ability to change the ID that is being output to the TH in Ka-Table?

Hi @philecker sure, https://komarovalexander.github.io/ka-table/#/custom-attributes use a custom attribute of headCell

childComponents={{
        headCell: {
          elementAttributes: (settings) => ({
            id: 'customID' 
          })
        }
      }}