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

Disable cells while table loading #13961

Open
wants to merge 2 commits into
base: 4.x
Choose a base branch
from
Open
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
7 changes: 5 additions & 2 deletions packages/forms/resources/js/components/file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,13 @@ export default function fileUploadFormComponent({
// FilePond has a weird English translation for the error message when a file of an unexpected
// type is uploaded, for example: `File of invalid type: Expects or image/*`. This is a
// hacky workaround to fix the message to be `File of invalid type: Expects image/*`.
this.error = `${error.main}: ${error.sub}`.replace('Expects or', 'Expects')
this.error = `${error.main}: ${error.sub}`.replace(
'Expects or',
'Expects',
)
})

this.pond.on('removefile', () => this.error = null)
this.pond.on('removefile', () => (this.error = null))
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@
\Filament\Support\prepare_inherited_attributes($attributes)
->merge($getExtraInputAttributes(), escape: false)
"
wire:loading.attr="disabled"
/>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
isLoading = false
"
:attributes="\Filament\Support\prepare_inherited_attributes($getExtraInputAttributeBag())"
wire:loading.attr="disabled"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work reliably with line 78? I believe that was the main challenge.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I'm not sure, but I can check!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah please check if you can :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reminding me. I completely forgot 😅. I will check as soon as I can!

>
@if ($canSelectPlaceholder)
<option value="">{{ $getPlaceholder() }}</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
])
)
"
wire:loading.attr="disabled"
/>
{{-- format-ignore-end --}}
</x-filament::input.wrapper>
Expand Down