Column header with blue outline after clicking for sorting
See original GitHub issueWhat 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?
- npm install -g create-react-app
- Add ‘react-table@6.7.5’ to package.json.
- 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;
- npm start.
- Click any title of headers, and it shows
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:11 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Add this to your CSS:
.ReactTable .rt-thead [role=“columnheader”] { outline: 0; }
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, } }; }}