question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Customizing table headers

See original GitHub issue

It appears the combination of a customized header and the ‘TextFilter’ results in a failed prop type warning. There doesn’t seem to be any missing functionality, but just wanted to bring this to light.

bundle.js:9327 Warning: Failed prop type: Invalid prop `columnName` of type `object` supplied to `TextFilter`, expected `string`.
    in TextFilter (created by TableHeaderColumn)
    in TableHeaderColumn (created by Releases)
    in tr (created by TableHeader)
    in thead (created by TableHeader)
<TableHeaderColumn
    ref='theader_release_name'
    key='release_name'
    dataSort={true}
    dataField='release_name'
    width="250px"
    filter={{ type: 'TextFilter', placeholder: 'Release Name' }}
    dataFormat={this.reportLinkCellFormat}>
    <Tooltip label='reltooltip' placement="top" trigger={['hover']} overlay={releaseTooltip}>
        <div>Releases</div>
    </Tooltip>
</TableHeaderColumn>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
AllenFangcommented, Aug 6, 2017

@batjko thanks your remind 😃

Actually, it was fixed before, if you have custom header(TableHeaderColumn), now it will work as expected, but please remember to add headerText on TableHeaderColumn !!!

<TableHeaderColumn dataField='xxx' headerText='product'>{ ... }</TableHeaderColumn>

Let me know if there’s still any bug when you have customization header, thanks 👍

1reaction
vikramtrscommented, Oct 19, 2017

@Rclass93 As said by @AllenFang don’t forget to add headerText on TableHeaderColumn.

<TableHeaderColumn dataField=‘selected_option’ dataSort dataAlign=“center” columnClassName={ this.columnClassNameFormat } filter={{ type: ‘TextFilter’, delay: 500, placeholder:“Procure”}} width=‘16%’ headerText=‘Acao’> Ação </TableHeaderColumn>

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Create Tableau Custom Table Headers - YouTube
Hello everyone! In this video, I'll show you how to create the customer value quadrant chart in Tableau.You can watch this video to...
Read more >
Customizing table column headers and rows - Documentation
The following example shows you how you can customize the header of the table. It is based on a CSS file provided as...
Read more >
Examples: Custom Header | BaseTable
This is a custom Header. Row 0 - Col 0. Row 0 - Col 1. Row 1 - Col 0 ... scrollalbe table's...
Read more >
How can you customize all elements in a table header?
The easiest thing would just be to use custom CSS on your component. In the <style> section add: <style> .v-data-table-header th ...
Read more >
Styling tables - Learn web development | MDN
Normally, table columns tend to be sized according to how much ... We've also set our custom font on the headings inside the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found