abiroot
abiroot
Explore posts from servers
FFilament
Created by abiroot on 1/20/2025 in #❓┊help
Trigger an Event from a custom field blade file
Ok now I understand my problem. My custom Modal: EliminationMatchesAction is not a Livewire component, so it's not listening for dispatched events. If I place the #[On] listener in my EditRecord page, it gets triggered:
class EditTournament extends EditRecord
{
protected static string $resource = TournamentResource::class;

#[On('reshuffle')]
public function reshuffle(): void
{
dd('reshuffle');
}

protected function getHeaderActions(): array
{
return [
Actions\DeleteAction::make(),
DistributeMatchesAction::make(),
ViewBracketAction::make(),
EliminationMatchesAction::make(),
ResetTournamentAction::make(),
];
}
}
class EditTournament extends EditRecord
{
protected static string $resource = TournamentResource::class;

#[On('reshuffle')]
public function reshuffle(): void
{
dd('reshuffle');
}

protected function getHeaderActions(): array
{
return [
Actions\DeleteAction::make(),
DistributeMatchesAction::make(),
ViewBracketAction::make(),
EliminationMatchesAction::make(),
ResetTournamentAction::make(),
];
}
}
However, placing the #[On()] listener inside of EliminationMatchesAction doesn't get triggered. I need to update the state ( $set ) of a field (the seed) which is inside of EliminationMatchesAction, on that event, which seems impossible?
17 replies
FFilament
Created by abiroot on 1/20/2025 in #❓┊help
Trigger an Event from a custom field blade file
It seems that there is no direct way for a blade file of a custom field to trigger events back to it's component
17 replies
FFilament
Created by abiroot on 1/20/2025 in #❓┊help
Trigger an Event from a custom field blade file
Alright I'll try to convert it to a livewire component. Thank's @Dennis Koch I'll report back here when I solve it
17 replies
FFilament
Created by abiroot on 1/20/2025 in #❓┊help
Trigger an Event from a custom field blade file
Can I attach a Livewire component directly as a field of a form? Or I must wrap it with a field first?
17 replies
FFilament
Created by abiroot on 1/20/2025 in #❓┊help
Trigger an Event from a custom field blade file
I know I could add an action to the EliminationMatchesAction form schema, like:
Actions::make([
Actions\Action::make('refresh_seed')
->label('Refresh Matches')
->icon('heroicon-o-arrow-path')
->action(function ($livewire, $set) {
$newSeed = random_int(1000, 9999);
$set('seed', $newSeed);
}),
]),
Actions::make([
Actions\Action::make('refresh_seed')
->label('Refresh Matches')
->icon('heroicon-o-arrow-path')
->action(function ($livewire, $set) {
$newSeed = random_int(1000, 9999);
$set('seed', $newSeed);
}),
]),
But I want to use the button from the blade
17 replies
FFilament
Created by abiroot on 1/20/2025 in #❓┊help
Trigger an Event from a custom field blade file
This is my structure: Custom action EliminationMatchesAction with the following simplified schema:
[
TextInput::make('seed')
->reactive()
->default(fn() => random_int(1000, 9999)),
TournamentRoundPreviewField::make('tournament_ranks_table_field')
->tournamentUuid(fn($state, $component) => $component->getRecord()->uuid)
->seed(fn($get) => $get('seed'))
->reactive()
->hiddenLabel()
->columnSpanFull(),
]
[
TextInput::make('seed')
->reactive()
->default(fn() => random_int(1000, 9999)),
TournamentRoundPreviewField::make('tournament_ranks_table_field')
->tournamentUuid(fn($state, $component) => $component->getRecord()->uuid)
->seed(fn($get) => $get('seed'))
->reactive()
->hiddenLabel()
->columnSpanFull(),
]
TournamentRoundPreviewField is a custom Filed component with it's own blade file. In that blade file, I'm showing a table of next rounds and a "Refresh Button". I want when the "Refresh Button" from the blade file is clicked, to change the value of the seed TextInput of the EliminationMatchesAction form.
17 replies
FFilament
Created by abiroot on 1/20/2025 in #❓┊help
Trigger an Event from a custom field blade file
@Dennis Koch In the blade file of the custom field component
17 replies
FFilament
Created by Jany on 7/3/2024 in #❓┊help
How to pass event from livewire component to Form Field Component
@Jany Were you able to solve this? I'm here for the exacct same problem. I can't seem to trigger events from a blade file of a custom Field component
3 replies
WWasp
Created by abiroot on 11/5/2024 in #🙋questions
I need help in debugging resource exhausted (Too many open files)
Done.
16 replies
WWasp
Created by abiroot on 11/5/2024 in #🙋questions
I need help in debugging resource exhausted (Too many open files)
Hey @Filip , apologies for the delay response and thank you for the awesome support. I can definetly share the code, but would rather privately?
16 replies
WWasp
Created by Jakub Idziak on 10/13/2024 in #🙋questions
OpenSaaS to Wasp 0.15.X update
Don't forget to go through the https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15 migration check lists
7 replies
WWasp
Created by abiroot on 10/12/2024 in #🙋questions
Load Custom fonts from `src/client/fonts/HossRound`
Thank you @miho Isin't it better if Wasp had the default vite.config with searchForWorkspaceRoot(process.cwd()), in its fs.allow config?
13 replies
WWasp
Created by abiroot on 10/12/2024 in #🙋questions
Load Custom fonts from `src/client/fonts/HossRound`
I added resolveProjectPath('../app/.wasp/out/web-app/src/') to my fs allow list, and it worked: import { defineConfig } from "vite"; import { resolveProjectPath } from "wasp/dev";
export default defineConfig({
server: {
open: true,
fs: {
allow: [
// Add the path to your fonts here
resolveProjectPath('./src/client/fonts'),
resolveProjectPath('../app/.wasp/out/web-app/src/'),
],
},
},
});
export default defineConfig({
server: {
open: true,
fs: {
allow: [
// Add the path to your fonts here
resolveProjectPath('./src/client/fonts'),
resolveProjectPath('../app/.wasp/out/web-app/src/'),
],
},
},
});
But I feel like now I made my whole app public? Is this a security mistake?
13 replies
WWasp
Created by abiroot on 10/12/2024 in #🙋questions
Load Custom fonts from `src/client/fonts/HossRound`
@kapa.ai
13 replies
WWasp
Created by abiroot on 10/12/2024 in #🙋questions
Load Custom fonts from `src/client/fonts/HossRound`
Now I get this error: [ Client!] 02:23:17 [vite] Pre-transform error: Failed to load url /src/index.tsx (resolved id: /Users/lamba/Projects/WASP/my-saas/app/.wasp/out/web-app/src/index.tsx). Does the file exist? [ Client!] The request url "/Users/lamba/Projects/WASP/my-saas/app/.wasp/out/web-app/src/index.tsx" is outside of Vite serving allow list.
13 replies
WWasp
Created by abiroot on 10/12/2024 in #🙋questions
resource exhausted (Too many open files)
It worked after doing: npm install @stitches/react npm cache clean --force npm install npm install --save-dev @types/jest ulimit -n 10000
10 replies
WWasp
Created by abiroot on 10/12/2024 in #🙋questions
resource exhausted (Too many open files)
Ok if this might help anyone debugging this, when I did npx tsc --noEmit I got these errors:
10 replies
WWasp
Created by abiroot on 10/12/2024 in #🙋questions
resource exhausted (Too many open files)
Ok not working at all. Any change I do breaks wasp start
10 replies
WWasp
Created by abiroot on 10/12/2024 in #🙋questions
resource exhausted (Too many open files)
I wish I had haskell experience so I could help debug this. From what it seems, haskell is one of the hardest languages right there xD
10 replies
WWasp
Created by abiroot on 9/28/2024 in #🙋questions
getDirectoryContents:openDirStream: resource exhausted (Too many open files)
Hey @sodic thank you for your support as always! It got solved by itself after doing a wasp clean
11 replies