react-component / slider
Showing 1 of 1 files from the diff.

@@ -3,8 +3,8 @@
Loading
3 3
import Track from './common/Track';
4 4
import createSlider from './common/createSlider';
5 5
import * as utils from './utils';
6 -
import { SliderProps } from './Slider';
7 -
import { GenericSliderProps, GenericSliderState } from './interface';
6 +
import type { SliderProps } from './Slider';
7 +
import type { GenericSliderProps, GenericSliderState } from './interface';
8 8
9 9
const trimAlignValue = ({
10 10
  value,
@@ -46,7 +46,7 @@
Loading
46 46
  reverse?: boolean;
47 47
  vertical?: boolean;
48 48
  marks?: Record<number, React.ReactNode | { style?: React.CSSProperties; label?: string }>;
49 -
  step?: number;
49 +
  step?: number | null;
50 50
  threshold?: number;
51 51
  prefixCls?: string;
52 52
  included?: boolean;
@@ -182,8 +182,8 @@
Loading
182 182
      return;
183 183
    }
184 184
    const currentValue = value || prevState.bounds;
185 -
    if (currentValue.some(v => utils.isValueOutOfRange(v, this.props))) {
186 -
      const newValues = currentValue.map(v => utils.ensureValueInRange(v, this.props));
185 +
    if (currentValue.some((v) => utils.isValueOutOfRange(v, this.props))) {
186 +
      const newValues = currentValue.map((v) => utils.ensureValueInRange(v, this.props));
187 187
      onChange(newValues);
188 188
    }
189 189
  }
@@ -196,7 +196,7 @@
Loading
196 196
    } else {
197 197
      const controlledState = {};
198 198
199 -
      ['handle', 'recent'].forEach(item => {
199 +
      ['handle', 'recent'].forEach((item) => {
200 200
        if (state[item] !== undefined) {
201 201
          controlledState[item] = state[item];
202 202
        }
@@ -277,10 +277,10 @@
Loading
277 277
      const max = maxValue - Math.max(...startBounds);
278 278
      const min = minValue - Math.min(...startBounds);
279 279
      const ratio = Math.min(Math.max(pos / (this.getSliderLength() / 100), min), max);
280 -
      const nextBounds = startBounds.map(v =>
280 +
      const nextBounds = startBounds.map((v) =>
281 281
        Math.floor(Math.max(Math.min(v + ratio, maxValue), minValue)),
282 282
      );
283 -
      if (state.bounds.map((c, i) => c === nextBounds[i]).some(c => !c)) {
283 +
      if (state.bounds.map((c, i) => c === nextBounds[i]).some((c) => !c)) {
284 284
        this.onChange({
285 285
          bounds: nextBounds,
286 286
        });
@@ -504,7 +504,7 @@
Loading
504 504
      ariaValueTextFormatterGroupForHandles,
505 505
    } = this.props;
506 506
507 -
    const offsets = bounds.map(v => this.calcOffset(v));
507 +
    const offsets = bounds.map((v) => this.calcOffset(v));
508 508
509 509
    const handleClassName = `${prefixCls}-handle`;
510 510
    const handles = bounds.map((v, i) => {
@@ -531,7 +531,7 @@
Loading
531 531
        reverse,
532 532
        disabled,
533 533
        style: handleStyle[i],
534 -
        ref: h => this.saveHandle(i, h),
534 +
        ref: (h) => this.saveHandle(i, h),
535 535
        ariaLabel: ariaLabelGroupForHandles[i],
536 536
        ariaLabelledBy: ariaLabelledByGroupForHandles[i],
537 537
        ariaValueTextFormatter: ariaValueTextFormatterGroupForHandles[i],
Files Coverage
src 88.49%
Project Totals (11 files) 88.49%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading