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.

Column header with blue outline after clicking for sorting

See original GitHub issue

What version of React-Table are you using?

Your bug may already be fixed in the latest release. Run yarn upgrade react-table! 6.7.5

What bug are you experiencing, or what feature are you proposing?

As described in Title. Refer to description by @gary-menzel in https://github.com/react-tools/react-table/issues/682

Use https://codesandbox.io/s/X6npLXPRW (by clicking the “Fork” button) to reproduce the issue.

https://codesandbox.io/s/5knzrn8qmk

What are the steps to reproduce the issue?

  1. npm install -g create-react-app
  2. Add ‘react-table@6.7.5’ to package.json.
  3. replace src/App.js with following code
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import ReactTable from 'react-table';
import 'react-table/react-table.css';

class App extends Component {
  constructor() {
    super();
  }
  render() {
    const data = [
            {
                "location":"01-01",
                "amount":150
            },
            {
                "location":"01-02",
                "amount":3000
            },
            {
                "location":"01-03",
                "amount":1201
            }
    ];

    const columns = [
      {
        Header: "Location",
        accessor: "location"
      },
      {
        Header: "Amount",
        accessor: "amount",
        Cell: props => <span className='number'>{props.value}</span>
      }
    ];

    return (
      <div className="App">
        <header className="App-header">
          <img src={logo} className="App-logo" alt="logo" />
          <h1 className="App-title">Welcome to React</h1>
        </header>
        <p className="App-intro">
          To get started, edit <code>src/App.js</code> and save to reload.
        </p>
        <ReactTable
          data={data}
          columns={columns}
          classsName='-striped -highlight'
        />
      </div>
    );
  }
}

export default App;
  1. npm start.
  2. Click any title of headers, and it shows

image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

26reactions
mikkel-vagncommented, May 14, 2018

Add this to your CSS:

.ReactTable .rt-thead [role=“columnheader”] { outline: 0; }

8reactions
cedricholzcommented, Jun 13, 2018

I updated react-table which didn’t work and I couldn’t figure out how to add Mikkel-Vagn’s css in without hardcoding it into the module files. This works for me though.

getTheadThProps={() => { return { style: { outline: 0, } }; }}

Read more comments on GitHub >

github_iconTop Results From Across the Web

Column header with blue outline after clicking for sorting
What are the steps to reproduce the issue? npm install -g create-react-app; Add 'react-table@6.7.5' to package.json. replace src ...
Read more >
How do I remove the blue border that appears when ...
The blue outline doesn't appear around the entire accordion header, but form fits around the text. I've tried inline styling, selection by ID...
Read more >
Guidelines and examples for sorting and filtering data by ...
Right-click a cell in the Markup column, point to Sort, and then click Custom Sort. In the Sort dialog box, select Markup under...
Read more >
Column Headers*
You can tell which column header is sorted on by the blue triangle next to the column. You can sort by a single...
Read more >
Excel table styles and formatting: how to apply, change ...
First column and last column - apply special formatting for the first and ... On the Home tab, in the Styles group, click...
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