Skip to content

Commit

Permalink
Fix(web-react): Removing unused prop #DS-933
Browse files Browse the repository at this point in the history
- unused prop `isDisabled` was removed from FileUploader component
  • Loading branch information
pavelklibani committed Oct 23, 2023
1 parent 0cb30d5 commit 0a3cef6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
12 changes: 6 additions & 6 deletions packages/web-react/src/components/FileUploader/FileUploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ import {

const FileUploader = (props: SpiritFileUploaderProps) => {
const {
children,
id,
fileQueue,
onDismiss,
addToQueue,
children,
clearQueue,
findInQueue,
updateQueue,
errorMessages,
fileQueue,
findInQueue,
id,
isFluid,
onDismiss,
updateQueue,
...restProps
} = props;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ const FileUploaderInput = (props: SpiritFileUploaderInputProps) => {
iconName = 'upload',
id,
inputRef,
isLabelHidden,
isDisabled,
queueLimitBehavior = 'none',
isLabelHidden,
isMultiple,
isRequired,
label,
Expand All @@ -28,6 +27,7 @@ const FileUploaderInput = (props: SpiritFileUploaderInputProps) => {
maxFileSize = DEFAULT_FILE_SIZE_LIMIT,
maxUploadedFiles = DEFAULT_FILE_QUEUE_LIMIT,
onError,
queueLimitBehavior = 'none',
validationState,
validationText,
...restProps
Expand All @@ -40,25 +40,25 @@ const FileUploaderInput = (props: SpiritFileUploaderInputProps) => {
isDragging,
isDropZoneHidden,
onChange,
onDragOver,
onDragEnter,
onDragLeave,
onDragOver,
onDrop,
} = useFileUploaderInput({
accept,
isMultiple,
maxFileSize,
maxUploadedFiles,
isMultiple,
queueLimitBehavior,
onError,
queueLimitBehavior,
});
const { classProps } = useFileUploaderStyleProps({
isDragAndDropSupported,
isLabelHidden,
isDisabled,
isDropZoneHidden,
isDragging,
isDisabledByQueueLimitBehavior,
isDragAndDropSupported,
isDragging,
isDropZoneHidden,
isLabelHidden,
isRequired,
queueLimitBehavior,
validationState,
Expand Down
1 change: 0 additions & 1 deletion packages/web-react/src/components/FileUploader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ const customUpdate = (_event: MouseEvent, file: File) => {
| `fileQueue` | `FileQueueMapType` ||| Queue of items to upload |
| `findInQueue` | `(key: string) => FileQueueMapType` ||| A callback to find a particular item in the queue |
| `id` | `string` ||| FileUploader id |
| `isDisabled` | `bool` ||| When the field is supposed to be disabled |
| `isFluid` | `bool` ||| When the field is supposed to be fluid |
| `onDismiss` | `(key: string) => FileQueueMapType` ||| A callback to delete a particular item from the queue |
| `UNSAFE_className` | `string` ||| FileUploader custom class name |
Expand Down
1 change: 0 additions & 1 deletion packages/web-react/src/types/fileUploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ export interface FileUploaderAttachmentBaseProps extends Omit<SpiritLItemElement

export interface FileUploaderBaseProps extends SpiritDivElementProps, Partial<FileUploaderErrorMessagesProps> {
id: string;
isDisabled?: boolean;
isFluid?: boolean;
}

Expand Down

0 comments on commit 0a3cef6

Please sign in to comment.