Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(web-react): Removing unused prop #DS-933 #1106

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 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 All @@ -120,6 +119,7 @@ export interface UncontrolledFileUploaderBaseProps
inputLabel: string;
inputName: string;
inputProps?: Partial<FileUploaderInputBaseProps>;
isDisabled?: boolean;
listId: string;
listProps?: Partial<FileUploaderListBaseProps>;
onChange?: (fileQueue: FileQueueMapType) => void;
Expand Down