File tree Expand file tree Collapse file tree 3 files changed +0
-19
lines changed Expand file tree Collapse file tree 3 files changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,6 @@ const inputRef = useRef<InputNumberRef>(null);
197197useEffect (() => {
198198 inputRef .current .focus (); // the input will get focus
199199 inputRef .current .blur (); // the input will lose focus
200- console .log (inputRef .current .input ); // The origin input element
201200}, []);
202201// ....
203202<InputNumber ref = { inputRef } />;
@@ -207,4 +206,3 @@ useEffect(() => {
207206| -------- | --------------------------------------- | --------------------------------- |
208207| focus | ` (options?: InputFocusOptions) => void ` | The input get focus when called |
209208| blur | ` () => void ` | The input loses focus when called |
210- | input | ` HTMLInputElement \| null ` | The origin input element |
Original file line number Diff line number Diff line change @@ -26,13 +26,6 @@ export type { ValueType };
2626export interface InputNumberRef extends HTMLInputElement {
2727 focus : ( options ?: InputFocusOptions ) => void ;
2828 blur : ( ) => void ;
29- setSelectionRange : (
30- start : number ,
31- end : number ,
32- direction ?: 'forward' | 'backward' | 'none' ,
33- ) => void ;
34- select : ( ) => void ;
35- input : HTMLInputElement | null ;
3629 nativeElement : HTMLElement ;
3730}
3831
Original file line number Diff line number Diff line change @@ -224,16 +224,6 @@ describe('InputNumber.Input', () => {
224224 expect ( onChange ) . not . toHaveBeenCalled ( ) ;
225225 } ) ;
226226
227- it ( 'input should work' , ( ) => {
228- const ref = React . createRef < InputNumberRef > ( ) ;
229- const { container } = render ( < InputNumber ref = { ref } /> ) ;
230- const inputEl = container . querySelector ( 'input' ) ! ;
231- const rootEl = container . querySelector ( '.rc-input-number' ) ! ;
232-
233- expect ( ref . current ?. input ) . toBe ( inputEl ) ;
234- expect ( ref . current ?. nativeElement ) . toBe ( rootEl ) ;
235- } ) ;
236-
237227 describe ( 'nativeElement' , ( ) => {
238228 it ( 'basic' , ( ) => {
239229 const ref = React . createRef < InputNumberRef > ( ) ;
You can’t perform that action at this time.
0 commit comments