react-component / slider

Compare d5edcc3 ... +0 ... 6afc1d6

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 3 files from the diff.
Other files ignored by Codecov

@@ -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
        }
@@ -272,13 +272,15 @@
Loading
272 272
    const maxValue = props.max || 100;
273 273
    const minValue = props.min || 0;
274 274
    if (dragTrack) {
275 +
      let pos = props.vertical ? -position : position;
276 +
      pos = props.reverse ? -pos : pos;
275 277
      const max = maxValue - Math.max(...startBounds);
276 278
      const min = minValue - Math.min(...startBounds);
277 -
      const ratio = Math.min(Math.max(position / (this.getSliderLength() / 100), min), max);
278 -
      const nextBounds = startBounds.map((v) =>
279 +
      const ratio = Math.min(Math.max(pos / (this.getSliderLength() / 100), min), max);
280 +
      const nextBounds = startBounds.map(v =>
279 281
        Math.floor(Math.max(Math.min(v + ratio, maxValue), minValue)),
280 282
      );
281 -
      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)) {
282 284
        this.onChange({
283 285
          bounds: nextBounds,
284 286
        });
@@ -502,7 +504,7 @@
Loading
502 504
      ariaValueTextFormatterGroupForHandles,
503 505
    } = this.props;
504 506
505 -
    const offsets = bounds.map((v) => this.calcOffset(v));
507 +
    const offsets = bounds.map(v => this.calcOffset(v));
506 508
507 509
    const handleClassName = `${prefixCls}-handle`;
508 510
    const handles = bounds.map((v, i) => {
@@ -529,7 +531,7 @@
Loading
529 531
        reverse,
530 532
        disabled,
531 533
        style: handleStyle[i],
532 -
        ref: (h) => this.saveHandle(i, h),
534 +
        ref: h => this.saveHandle(i, h),
533 535
        ariaLabel: ariaLabelGroupForHandles[i],
534 536
        ariaLabelledBy: ariaLabelledByGroupForHandles[i],
535 537
        ariaValueTextFormatter: ariaValueTextFormatterGroupForHandles[i],

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
src 0.03% 88.49%
Project Totals (11 files) 88.49%
Loading