File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11/* eslint react/no-is-mounted:0,react/sort-comp:0,react/prop-types:0 */
2- import { clsx } from 'clsx' ;
32import pickAttrs from '@rc-component/util/lib/pickAttrs' ;
3+ import { clsx } from 'clsx' ;
44import React , { Component } from 'react' ;
55import attrAccept from './attr-accept' ;
66import type {
@@ -35,10 +35,10 @@ class AjaxUploader extends Component<UploadProps> {
3535 } ;
3636
3737 onChange = ( e : React . ChangeEvent < HTMLInputElement > ) => {
38- const { accept } = this . props ;
38+ const { accept, directory } = this . props ;
3939 const { files } = e . target ;
4040 const acceptedFiles = [ ...files ] . filter (
41- ( file : RcFile ) => this . isNativeDirectory ( ) || attrAccept ( file , accept ) ,
41+ ( file : RcFile ) => ! directory || this . isNativeDirectory ( ) || attrAccept ( file , accept ) ,
4242 ) ;
4343 this . uploadFiles ( acceptedFiles ) ;
4444 this . reset ( ) ;
You can’t perform that action at this time.
0 commit comments