Skip to content

Commit e3d9aee

Browse files
authored
FileUploader: revert maxWidth calculation update (#31659)
1 parent bc95b52 commit e3d9aee

File tree

5 files changed

+3
-6
lines changed

5 files changed

+3
-6
lines changed

e2e/testcafe-devextreme/tests/editors/chat/data/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const attachments = [
9797
},
9898
{
9999
name: '9138cf2e-ced3-426a-bb53-4478536f690b.zip',
100-
size: 1024000,
100+
size: 102400,
101101
},
102102
];
103103

88 Bytes
Loading
-125 Bytes
Loading
3.78 KB
Loading

packages/devextreme/js/__internal/ui/file_uploader/file_uploader.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ const FILEUPLOADER_INVALID_CLASS = 'dx-fileuploader-invalid';
7373

7474
const FILEUPLOADER_AFTER_LOAD_DELAY = 400;
7575
const DRAG_EVENT_DELTA = 1;
76-
const GAP = 10;
77-
const REFERENCE_TEXT = '1023 bytes';
7876

7977
const DIALOG_TRIGGER_EVENT_NAMESPACE = 'dxFileUploaderDialogTrigger';
8078

@@ -805,12 +803,11 @@ class FileUploader extends Editor<FileUploaderProperties> {
805803
const iconWidth = _showFileIcon ? getOuterWidth($icon) : 0;
806804

807805
const prevFileSize = $fileSize?.text();
808-
$fileSize?.text(REFERENCE_TEXT);
806+
$fileSize?.text('1000 Mb');
809807
const fileSizeWidth = getWidth($fileSize);
810808
$fileSize?.text(prevFileSize ?? '');
811809

812-
const maxWidth = filesContainerWidth - buttonsWidth - fileSizeWidth - iconWidth - GAP;
813-
810+
const maxWidth = filesContainerWidth - buttonsWidth - fileSizeWidth - iconWidth;
814811
this._$filesContainer?.find(`.${FILEUPLOADER_FILE_NAME_CLASS}`).css('maxWidth', maxWidth);
815812
}
816813

0 commit comments

Comments
 (0)