feat(fields): inclui estado de loading nos componentes#2740
Conversation
There was a problem hiding this comment.
🟡 Upload drag-drop area not disabled during loading state
When p-loading is set to true on po-upload, the drag-drop area remains enabled, allowing users to drag and drop files while the component visually indicates a loading state.
Root Cause: Child component's isDisabled override shadows base class's loading-aware getter
The PR adds a new isDisabled getter to PoUploadBaseComponent at po-upload-base.component.ts:864-866 that includes loading:
get isDisabled(): boolean {
return this.disabled || this.loading;
}However, PoUploadComponent at po-upload.component.ts:173-189 already overrides isDisabled with its own complex logic that does not include loading:
get isDisabled(): boolean {
const currentFiles = this.currentFiles || [];
return this.requiredUrl
? !!(this.hasAnyFileUploading(currentFiles) || !this.url || this.disabled || ...)
: !!(this.hasAnyFileUploading(currentFiles) || this.autoUpload || this.disabled || ...);
}The PR correctly added isSelectButtonDisabled (which includes loading) for the select button and isFieldDisabled for the field container/bottom. But the drag-drop area at po-upload.component.html:32 still uses the unmodified isDisabled:
<po-upload-drag-drop
[p-disabled]="isDisabled"
...
>Impact: Users can drag and drop files onto the upload area while the component is in a loading state, which is inconsistent with the select button being disabled and the visual loading indication.
(Refers to line 32)
Was this helpful? React with 👍 or 👎 to provide feedback.
13ccdda to
744900e
Compare
744900e to
b7ace75
Compare
1748630 to
b7ace75
Compare
b7ace75 to
b2ddd36
Compare
d1ba598 to
64a7a47
Compare
- adiciona propriedade p-loading nos componentes po-rich-text, po-textarea e po-upload - adiciona suporte à propriedade p-disabled no po-rich-text - ajusta cor do loading no po-button para manter consistência com os fields fixes DTHFUI-12440
64a7a47 to
1472254
Compare
po-textarea, po-rich-text, po-upload
DTHFUI-12440
PR Checklist [Revisor]
Qual o novo comportamento?
Simulação
Samples - Portal