Prymiee
Prymiee
FFilament
Created by ChesterS on 10/16/2024 in #❓┊help
Change widget icon color
the underlying Blade component (vendor/filament/widgets/resources/views/stats-overview-widget/stat.blade.php:~45) has:
<x-filament::icon
:icon="$icon"
class="fi-wi-stats-overview-stat-icon h-5 w-5 text-gray-400 dark:text-gray-500"
/>
<x-filament::icon
:icon="$icon"
class="fi-wi-stats-overview-stat-icon h-5 w-5 text-gray-400 dark:text-gray-500"
/>
So the SVG has those colors more specifically set on it. Not a lovely solution but it can be done: https://filamentphp.com/docs/3.x/support/style-customization#applying-styles-to-hook-classes specifically:
.fi-wi-stats-overview-stat-icon {
@apply text-green-400 !important;
}
.fi-wi-stats-overview-stat-icon {
@apply text-green-400 !important;
}
BUT!! This is global :// so maybe worth a PR 🙂
9 replies
FFilament
Created by ericmp on 1/26/2024 in #❓┊help
Autofocus only when on desktop & action is create
@ericmp so sorry for the delay and misleading information;
->autofocus(function (Request $request, string $operation) {
return $operation === 'create' && somewayofdeterminingagent$request;
}),
->autofocus(function (Request $request, string $operation) {
return $operation === 'create' && somewayofdeterminingagent$request;
}),
16 replies
FFilament
Created by ericmp on 1/26/2024 in #❓┊help
Autofocus only when on desktop & action is create
it would be on the Create resource page
16 replies
FFilament
Created by ericmp on 1/26/2024 in #❓┊help
Autofocus only when on desktop & action is create
You may have to use the mount method, inject the Illuminate\Http\Request and set the variable on the component itself with an attribute like Locked (https://livewire.laravel.com/docs/locked) Edit, I'm dumb and should be able to inject within the autofocus closure.
16 replies
FFilament
Created by ericmp on 1/26/2024 in #❓┊help
Autofocus only when on desktop & action is create
Not sure about how to achive the desktop determination (maybe you could check via the user-agent or defer to a package like: https://github.com/phattarachai/laravel-mobile-detect) As for implementation regarding the "create" action (https://filamentphp.com/docs/3.x/forms/advanced#injecting-the-current-form-operation):
TextInput::make()->autofocus(function (string $operation) {
return $operation === 'create';
});
TextInput::make()->autofocus(function (string $operation) {
return $operation === 'create';
});
16 replies
FFilament
Created by Prymiee on 1/26/2024 in #❓┊help
Wizard, stop from going to next step within `beforeValidation` or `afterValidation`
// Not sure afterValidation is correct here but, would like to ensure the inputs are validated before sending the API calls
Step::make('Payment Processing')->afterValidation(function () {
// Make an API call
// Determine if the inputs were valid
// If they are NOT valid, popup a modal (like `$this->dispatch('open-modal', id: 'invalid-token')`) and do not progress to the next step.
})->schema([
TextInput::make('access_token')->required(),
]),
// Not sure afterValidation is correct here but, would like to ensure the inputs are validated before sending the API calls
Step::make('Payment Processing')->afterValidation(function () {
// Make an API call
// Determine if the inputs were valid
// If they are NOT valid, popup a modal (like `$this->dispatch('open-modal', id: 'invalid-token')`) and do not progress to the next step.
})->schema([
TextInput::make('access_token')->required(),
]),
Am I wildly off-base for setting up a way to interact and validate user input semi-realtime via another source?
3 replies
FFilament
Created by IndomieRendang on 8/6/2023 in #❓┊help
Can't disable checkbox, radio, toggle?
Is there an issue created in Livewire/Livewire?
6 replies
FFilament
Created by Prymiee on 8/3/2023 in #❓┊help
FileUpload imageEditor Alpine Error
Aspect ratios don't work at all; just saw this reply. Will open an issue soon.
5 replies
FFilament
Created by Prymiee on 8/3/2023 in #❓┊help
FileUpload imageEditor Alpine Error
Full console exception
5 replies