rsuite 4.10.3 → 4.10.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -124,4 +124,9 @@ describe('Modal', () => {
124
124
  const instance = getInstance(<Modal classPrefix="custom-prefix" show />);
125
125
  assert.ok(instance.dialogElement.className.match(/\bcustom-prefix\b/));
126
126
  });
127
+
128
+ it('Should be forced to focus on Modal', () => {
129
+ const instance = getInstance(<Modal className="custom" show />);
130
+ assert.equal(instance.dialogElement, document.activeElement);
131
+ });
127
132
  });
@@ -1,7 +1,9 @@
1
1
  import * as React from 'react';
2
- import { StandardProps } from '../@types/common';
2
+ import { StandardProps, FormControlBaseProps } from '../@types/common';
3
3
 
4
- export interface SliderProps<ValueType = number> extends StandardProps {
4
+ export interface SliderProps<ValueType = number>
5
+ extends StandardProps,
6
+ FormControlBaseProps<ValueType> {
5
7
  /** Minimum value of sliding range */
6
8
  min?: number;
7
9
 
@@ -11,12 +13,6 @@ export interface SliderProps<ValueType = number> extends StandardProps {
11
13
  /** Slide the value of one step */
12
14
  step?: number;
13
15
 
14
- /** Value (Controlled) */
15
- value?: ValueType;
16
-
17
- /** Default value */
18
- defaultValue?: ValueType;
19
-
20
16
  /** A css class to apply to the Handle node. */
21
17
  handleClassName?: string;
22
18
 
@@ -44,9 +40,6 @@ export interface SliderProps<ValueType = number> extends StandardProps {
44
40
  /** Vertical Slide */
45
41
  vertical?: boolean;
46
42
 
47
- /** Callback function that changes data */
48
- onChange?: (value: ValueType, event: React.MouseEvent) => void;
49
-
50
43
  /** Customize labels on the render ruler */
51
44
  renderMark?: (mark: number) => React.ReactNode;
52
45
  }
@@ -284,7 +284,7 @@ class Uploader extends React.Component<UploaderProps, UploaderState> {
284
284
  fileList: nextFileList
285
285
  };
286
286
 
287
- if (nextFile.progress) {
287
+ if (nextFile.progress || nextFile.status === 'error') {
288
288
  const { fileMap } = this.state;
289
289
 
290
290
  fileMap[nextFile.fileKey] = {