Skip to content

Commit

Permalink
Fix primefaces#4533: FileUpload input passthrough in basic mode
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Jun 21, 2023
1 parent 76a4a2e commit ac92dd1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion components/lib/fileupload/FileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,18 @@ export const FileUpload = React.memo(
);
const icon = chooseOptions.icon ? chooseOptions.icon : !chooseOptions.icon && (!hasFiles || props.auto) ? <PlusIcon {...chooseIconProps} /> : !chooseOptions.icon && hasFiles && !props.auto && <UploadIcon {...chooseIconProps} />;
const chooseIcon = IconUtils.getJSXIcon(icon, { ...chooseIconProps }, { props, hasFiles });
const input = !hasFiles && <input ref={fileInputRef} type="file" accept={props.accept} multiple={props.multiple} disabled={disabled} onChange={onFileSelect} />;
const inputProps = mergeProps(
{
ref: fileInputRef,
type: 'file',
onChange: (e) => onFileSelect(e),
multiple: props.multiple,
accept: props.accept,
disabled: disabled
},
ptm('input')
);
const input = !hasFiles && <input {...inputProps} />;
const rootProps = mergeProps(
{
className,
Expand Down

0 comments on commit ac92dd1

Please sign in to comment.