mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2026-06-28 21:20:04 +00:00
adjustments via eslint
This commit is contained in:
@@ -132,11 +132,11 @@ class DateFilter extends Component {
|
||||
className={ `filter date-filter ${className}` }
|
||||
style={ style }
|
||||
>
|
||||
<label htmlFor={`date-filter-comparator-${ column.text }`}>
|
||||
<label htmlFor={ `date-filter-comparator-${text}` }>
|
||||
<span className="sr-only">Filter comparator</span>
|
||||
<select
|
||||
ref={ n => this.dateFilterComparator = n }
|
||||
id={`date-filter-comparator-${ column.text }`}
|
||||
id={ `date-filter-comparator-${text}` }
|
||||
style={ comparatorStyle }
|
||||
className={ `date-filter-comparator form-control ${comparatorClassName}` }
|
||||
onChange={ this.onChangeComparator }
|
||||
@@ -145,11 +145,11 @@ class DateFilter extends Component {
|
||||
{ this.getComparatorOptions() }
|
||||
</select>
|
||||
</label>
|
||||
<label htmlFor={`date-filter-column-${ column.text }`}>
|
||||
<span className="sr-only">Enter ${ column.text }</span>
|
||||
<label htmlFor={ `date-filter-column-${text}` }>
|
||||
<span className="sr-only">Enter ${ text }</span>
|
||||
<input
|
||||
ref={ n => this.inputDate = n }
|
||||
id={`date-filter-column-${ column.text }`}
|
||||
id={ `date-filter-column-${text}` }
|
||||
className={ `filter date-filter-input form-control ${dateClassName}` }
|
||||
style={ dateStyle }
|
||||
type="date"
|
||||
|
||||
@@ -111,12 +111,12 @@ class MultiSelectFilter extends Component {
|
||||
`filter select-filter form-control ${className} ${this.state.isSelected ? '' : 'placeholder-selected'}`;
|
||||
|
||||
return (
|
||||
<label htmlFor={`multiselect-filter-column-${column.text}`}>
|
||||
<label htmlFor={ `multiselect-filter-column-${column.text}` }>
|
||||
<span className="sr-only">Filter by {column.text}</span>
|
||||
<select
|
||||
{ ...rest }
|
||||
ref={ n => this.selectInput = n }
|
||||
id={`multiselect-filter-column-${column.text}`}
|
||||
id={ `multiselect-filter-column-${column.text}` }
|
||||
style={ style }
|
||||
multiple
|
||||
className={ selectClass }
|
||||
|
||||
@@ -170,16 +170,16 @@ class NumberFilter extends Component {
|
||||
return (
|
||||
<div
|
||||
onClick={ e => e.stopPropagation() }
|
||||
className={`filter number-filter ${className}`}
|
||||
className={ `filter number-filter ${className}` }
|
||||
style={ style }
|
||||
>
|
||||
<label htmlFor={`number-filter-comparator-${column.text}`}>
|
||||
<label htmlFor={ `number-filter-comparator-${column.text}` }>
|
||||
<span className="sr-only">Filter comparator</span>
|
||||
<select
|
||||
ref={ n => this.numberFilterComparator = n }
|
||||
style={ comparatorStyle }
|
||||
id={`number-filter-comparator-${ column.text }`}
|
||||
className={`number-filter-comparator form-control ${comparatorClassName}`}
|
||||
id={ `number-filter-comparator-${column.text}` }
|
||||
className={ `number-filter-comparator form-control ${comparatorClassName}` }
|
||||
onChange={ this.onChangeComparator }
|
||||
defaultValue={ defaultValue ? defaultValue.comparator : '' }
|
||||
>
|
||||
@@ -187,33 +187,33 @@ class NumberFilter extends Component {
|
||||
</select>
|
||||
</label>
|
||||
{
|
||||
options ?
|
||||
<label htmlFor={`number-filter-column-${ column.text }`}>
|
||||
<span className="sr-only">{`Select ${column.text}`}</span>
|
||||
<select
|
||||
ref={ n => this.numberFilter = n }
|
||||
id={`number-filter-column-${ column.text }`}
|
||||
style={ numberStyle }
|
||||
className={ selectClass }
|
||||
onChange={ this.onChangeNumberSet }
|
||||
defaultValue={ defaultValue ? defaultValue.number : '' }
|
||||
>
|
||||
{ this.getNumberOptions() }
|
||||
</select>
|
||||
</label> :
|
||||
<label htmlFor={`number-filter-column-${ column.text }`}>
|
||||
<span className="sr-only">{`Enter ${ column.text }`}</span>
|
||||
<input
|
||||
ref={ n => this.numberFilter = n }
|
||||
id={`number-filter-column-${ column.text }`}
|
||||
type="number"
|
||||
style={ numberStyle }
|
||||
className={`number-filter-input form-control ${numberClassName}`}
|
||||
placeholder={ placeholder || `Enter ${column.text}...` }
|
||||
onChange={ this.onChangeNumber }
|
||||
defaultValue={ defaultValue ? defaultValue.number : '' }
|
||||
/>
|
||||
</label>
|
||||
options ?
|
||||
<label htmlFor={ `number-filter-column-${column.text}` }>
|
||||
<span className="sr-only">{`Select ${column.text}`}</span>
|
||||
<select
|
||||
ref={ n => this.numberFilter = n }
|
||||
id={ `number-filter-column-${column.text}` }
|
||||
style={ numberStyle }
|
||||
className={ selectClass }
|
||||
onChange={ this.onChangeNumberSet }
|
||||
defaultValue={ defaultValue ? defaultValue.number : '' }
|
||||
>
|
||||
{ this.getNumberOptions() }
|
||||
</select>
|
||||
</label> :
|
||||
<label htmlFor={ `number-filter-column-${column.text}` }>
|
||||
<span className="sr-only">{`Enter ${column.text}`}</span>
|
||||
<input
|
||||
ref={ n => this.numberFilter = n }
|
||||
id={ `number-filter-column-${column.text}` }
|
||||
type="number"
|
||||
style={ numberStyle }
|
||||
className={ `number-filter-input form-control ${numberClassName}` }
|
||||
placeholder={ placeholder || `Enter ${column.text}...` }
|
||||
onChange={ this.onChangeNumber }
|
||||
defaultValue={ defaultValue ? defaultValue.number : '' }
|
||||
/>
|
||||
</label>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -136,12 +136,12 @@ class SelectFilter extends Component {
|
||||
`filter select-filter form-control ${className} ${this.state.isSelected ? '' : 'placeholder-selected'}`;
|
||||
|
||||
return (
|
||||
<label htmlFor={`select-filter-column-${ column.text }`}>
|
||||
<label htmlFor={ `select-filter-column-${column.text}` }>
|
||||
<span className="sr-only">Filter by { column.text }</span>
|
||||
<select
|
||||
{ ...rest }
|
||||
ref={ n => this.selectInput = n }
|
||||
id={`select-filter-column-${ column.text }`}
|
||||
id={ `select-filter-column-${column.text}` }
|
||||
style={ style }
|
||||
className={ selectClass }
|
||||
onChange={ this.filter }
|
||||
|
||||
@@ -94,13 +94,13 @@ class TextFilter extends Component {
|
||||
|
||||
// stopPropagation for onClick event is try to prevent sort was triggered.
|
||||
return (
|
||||
<label htmlFor={`text-filter-column-${text}`}>
|
||||
<label htmlFor={ `text-filter-column-${text}` }>
|
||||
<span className="sr-only">Filter by {text}</span>
|
||||
<input
|
||||
{ ...rest }
|
||||
ref={ n => this.input = n }
|
||||
type="text"
|
||||
id={`text-filter-column-${ text }`}
|
||||
id={ `text-filter-column-${text}` }
|
||||
className={ `filter text-filter form-control ${className}` }
|
||||
style={ style }
|
||||
onChange={ this.filter }
|
||||
|
||||
@@ -30,7 +30,7 @@ class PageButton extends Component {
|
||||
}, className);
|
||||
|
||||
return (
|
||||
<li className={ classes } title={`page-${title}`}>
|
||||
<li className={ classes } title={ `page-${title}` }>
|
||||
<a href="#" onClick={ this.handleClick } className="page-link">{ page }</a>
|
||||
</li>
|
||||
);
|
||||
|
||||
@@ -105,7 +105,7 @@ describe('PageButton', () => {
|
||||
const title = 'aTitle';
|
||||
beforeEach(() => {
|
||||
wrapper = shallow(
|
||||
<PageButton {...props} active disabled={false} title={`page-${ title }`} />
|
||||
<PageButton { ...props } active disabled={ false } title={ `page-${title}` } />
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -55,15 +55,15 @@ class SearchBar extends React.Component {
|
||||
className,
|
||||
style,
|
||||
placeholder,
|
||||
tableId,
|
||||
tableId
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<label htmlFor={`search-bar-${tableId}`} className="w-100">
|
||||
<span className="sr-only">Search this table</span>
|
||||
<label htmlFor={ `search-bar-${tableId}` } className="w-100">
|
||||
<span className="sr-only">Search this table</span>
|
||||
<input
|
||||
ref={ n => this.input = n }
|
||||
id={`search-bar-${ tableId }`}
|
||||
id={ `search-bar-${tableId}` }
|
||||
type="text"
|
||||
style={ style }
|
||||
onKeyUp={ () => this.onKeyup() }
|
||||
|
||||
Reference in New Issue
Block a user