Skip to content

Commit

Permalink
[EuiFilePicker] Fix can still be cleared when disabled (#5603)
Browse files Browse the repository at this point in the history
* Pass disabled prop down to buttons in EuiFilePicker

* Add EuiFilePicker bugfix to changelog

* Don't display remove buttons at all when EuiFilePicker is disabled
  • Loading branch information
ayoung19 authored Feb 4, 2022
1 parent d794a70 commit 966bb88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
**Bug fixes**

- Fixed `EuiInMemoryTable`'s `onTableChange` callback not returning the correct `sort.field` value on pagination ([#5588](https://github.com/elastic/eui/pull/5588))
- Fixed `EuiFilePicker` allowing files to be removed when `disabled` ([#5603](https://github.com/elastic/eui/pull/5603))

## [`46.2.0`](https://github.com/elastic/eui/tree/v46.2.0)

Expand Down
2 changes: 1 addition & 1 deletion src/components/form/file_picker/file_picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export class EuiFilePicker extends Component<EuiFilePickerProps> {
clearButton = (
<EuiLoadingSpinner className="euiFilePicker__loadingSpinner" />
);
} else if (isOverridingInitialPrompt) {
} else if (isOverridingInitialPrompt && !disabled) {
if (normalFormControl) {
clearButton = (
<button
Expand Down

0 comments on commit 966bb88

Please sign in to comment.