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

Modify the text displayed in the column header tooltip #1182

Closed
ptadas opened this issue Mar 29, 2017 · 6 comments
Closed

Modify the text displayed in the column header tooltip #1182

ptadas opened this issue Mar 29, 2017 · 6 comments

Comments

@ptadas
Copy link

ptadas commented Mar 29, 2017

How would one modify the text displayed in the tooltip? I've tried using headerText, but it seems to have no effect when the column name is not an object. For instance, I'd like to name my column "YoY" and display "Year over year" in the tooltip. Thanks

@AllenFang
Copy link
Owner

HI, use headerText on TableHeaderColumn

@ptadas
Copy link
Author

ptadas commented Apr 4, 2017

this does not seem to work for me. The text displayed when I hover over the column header is still the same as the text supplied to name

    <TableHeaderColumn
      headerText='Product Name'
      key={Math.random()}
      dataField={value.data}
      dataSort={true}
      export={value.export}
      hidden={value.hidden}
      isKey={index === 0}
      dataAlign={typeof value.align !== 'undefined' ? 'left' : 'right'}
      dataFormat={value.format}
      sortFunc={this.revertSortFunc}
    >
        {value.name}
    </TableHeaderColumn>

I would expect to see 'Product Name' when I hover over the column name?

UPDATE:
Had to add headerTitle={ false } in order for the headerText to appear

@AllenFang
Copy link
Owner

Had to add headerTitle={ false } in order for the headerText to appear

There's a little bug I guess, I'll check this out, thanks 👍

@AllenFang
Copy link
Owner

Fixed on v3.1.7, please have a look on it, thanks 👍

@ajaykgp
Copy link

ajaykgp commented Feb 14, 2018

HeaderText also changes the header in the insert modal. Is there a way to keep the header in insert modal the same as in the name from the dataField?

@AllenFang
Copy link
Owner

@ajaykgp yes, there's default behavior, react-bootstrap-table will apply the header description to the input field in insert modal. there's only one way to do is custom the each field, you can check https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/custom/insert-modal/custom-insert-modal-field.js

in your custom input, add the placeholder will solve your requirement

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

No branches or pull requests

3 participants