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 loadng #14961

Conversation

thethunderturner
Copy link
Contributor

@thethunderturner thethunderturner commented Dec 1, 2024

Description

This PR reopens #14947 (this time for v4) )and closes #7294.

Visual changes

2024-12-02.00-50-38.mp4

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

Copy link
Member

@danharrin danharrin left a comment

Choose a reason for hiding this comment

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

Can you please add 'wire:target' => implode(',', \Filament\Tables\Table::LOADING_TARGETS), for these so that the loading indicator isn't activated while the field is being edited

@danharrin danharrin added the enhancement New feature or request label Dec 2, 2024
@danharrin danharrin added this to the v4 milestone Dec 2, 2024
@thethunderturner
Copy link
Contributor Author

Can you please add 'wire:target' => implode(',', \Filament\Tables\Table::LOADING_TARGETS), for these so that the loading indicator isn't activated while the field is being edited

Is it ok now? I added them, even though I couldnt really see any loading indicators 🤷

@danharrin
Copy link
Member

Sorry, I meant loading state (disabled attribute) not loading indicator

@danharrin
Copy link
Member

Also, do these changes need to be made for the button in the ToggleColumn?

@thethunderturner
Copy link
Contributor Author

thethunderturner commented Dec 2, 2024

Also, do these changes need to be made for the button in the ToggleColumn?

Yes, they do. Thanks for reminding

@thethunderturner
Copy link
Contributor Author

Is it ready now?

@danharrin danharrin merged commit 95ec00d into filamentphp:4.x Dec 2, 2024
@danharrin
Copy link
Member

Thanks

@thethunderturner
Copy link
Contributor Author

Thanks

You're welcome! Dont forget to close the issue

@danharrin
Copy link
Member

Thanks for the reminder, I forgot

@@ -49,6 +50,8 @@ public function toEmbeddedHtml(): string
$inputAttributes = $this->getExtraInputAttributeBag()
->merge([
'disabled' => $isDisabled,
'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.

Has this been tested to work with disabled columns?
I commented about that on the previous PR too since I believe that was the original challenge I couldn't work around last year.

@danharrin @thethunderturner

Copy link
Contributor Author

@thethunderturner thethunderturner Dec 3, 2024

Choose a reason for hiding this comment

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

I believe it works. Unless Im still missing your point... If the column is disabled, then all cells will be disabled and during loading they will stay disabled. If some of them are enabled, then they will get disabled until they're finished loading. Is this what you mean with disabled columns?

2024-12-03.14-25-32.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants