ElCoco
ElCoco
FFilament
Created by ElCoco on 9/9/2024 in #❓┊help
Where to find Filament color styles for default themes
I guess the theme system overrides the default tailwind classes. If that is the case I would like to know which classes are used for background and background highlights colors. And if there is a place where I can see a list of all the classes the theme system is overriding.
3 replies
FFilament
Created by ElCoco on 9/7/2024 in #❓┊help
Showing notifications as modals
lol actually that link I passed is EXACTLY what I need, so yeah, that is the solution 🤣
11 replies
FFilament
Created by ElCoco on 9/7/2024 in #❓┊help
Showing notifications as modals
I will post the full solution when I have it
11 replies
FFilament
Created by ElCoco on 9/7/2024 in #❓┊help
Showing notifications as modals
11 replies
FFilament
Created by ElCoco on 9/7/2024 in #❓┊help
Showing notifications as modals
Oh this is cool, but is not what I want (because still requires to trigger another action by pressing a button). I found a solution that might work using javascript events. Now I just need to find if there is a <x-filament-modal> blade tag or something similar in filament so I can make the modal look filament like.
11 replies
FFilament
Created by ElCoco on 9/7/2024 in #❓┊help
Showing notifications as modals
mmm what do you mean? It would be of great help if you could point me to an example 🙂
11 replies
FFilament
Created by ElCoco on 9/7/2024 in #❓┊help
Showing notifications as modals
No, that one shows before the action, I want a modal after the action so I can show a breakdown of what the action did. Thanks for you answer 🙂
11 replies
FFilament
Created by ElCoco on 9/28/2023 in #❓┊help
Sending a form when pressing enter
Just in case someone is looking for an answer to this, the only way I found to do that is to create a hidden submit button.
protected function promptForm(Form $form): Form
{
return $form
->schema([
FilamentForms\Grid::make()
->schema([
FilamentForms\TextInput::make('prompt')
->label('Start Conversation')
->autofocus()
->autocomplete(false)
->columnSpan(11),
FilamentForms\Select::make('systemPrompt')
->label('Bots available')
->searchable()
->options(Prompt::all()->pluck('name', 'id'))
->default(Prompt::where('is_default', true)->pluck('id')->first())
->columnSpan(4),
FilamentForms\TextInput::make('submitBtn')
->hiddenLabel()
->type('submit')
->extraAttributes(['class' => 'invisible'])
->columnSpan(1)
])
->columns(16)
]);
}
protected function promptForm(Form $form): Form
{
return $form
->schema([
FilamentForms\Grid::make()
->schema([
FilamentForms\TextInput::make('prompt')
->label('Start Conversation')
->autofocus()
->autocomplete(false)
->columnSpan(11),
FilamentForms\Select::make('systemPrompt')
->label('Bots available')
->searchable()
->options(Prompt::all()->pluck('name', 'id'))
->default(Prompt::where('is_default', true)->pluck('id')->first())
->columnSpan(4),
FilamentForms\TextInput::make('submitBtn')
->hiddenLabel()
->type('submit')
->extraAttributes(['class' => 'invisible'])
->columnSpan(1)
])
->columns(16)
]);
}
I guess there is a better way to do this but oh well...
3 replies
FFilament
Created by ElCoco on 9/11/2023 in #❓┊help
Why this RepeatableEntry code doesn't work as expected
For anybody interested, I fix it by createing the action clousure like this:
->action(function (Action $action) {
dd($action->getInfolistComponent()->getState());
})
->action(function (Action $action) {
dd($action->getInfolistComponent()->getState());
})
Here is the full code:
public function conversationsList(Infolist $infolist): Infolist
{
// dd($conversations);
return $infolist
->schema([
FilamentInfolists\RepeatableEntry::make('conversations')
->hiddenLabel(true)
->schema([
FilamentInfolists\TextEntry::make('id')
->action(Action::make('select')
->action(function (Action $action) {
dd($action->getInfolistComponent()->getState());
})
),
FilamentInfolists\TextEntry::make('name')
->hiddenLabel()
])
])
->state($this->conversations)
->columns(1);
}
public function conversationsList(Infolist $infolist): Infolist
{
// dd($conversations);
return $infolist
->schema([
FilamentInfolists\RepeatableEntry::make('conversations')
->hiddenLabel(true)
->schema([
FilamentInfolists\TextEntry::make('id')
->action(Action::make('select')
->action(function (Action $action) {
dd($action->getInfolistComponent()->getState());
})
),
FilamentInfolists\TextEntry::make('name')
->hiddenLabel()
])
])
->state($this->conversations)
->columns(1);
}
This seems a bit gross to me, probably there is a better way...
5 replies
FFilament
Created by ElCoco on 9/3/2023 in #❓┊help
Save to DB after deleting a repeater element
Hi! No I didn't try that actually. At the end I changed my approach to just having a custom page inside the filament panel so I had more control. Another things I was missing is that I should be able to select one of the Repeater elements and then update the conversation on the right. I was taking way too much time to figure these things out that's why I changed to a custom page. Thx for your help!
5 replies
FFilament
Created by ElCoco on 8/31/2023 in #❓┊help
Can a suffixAction be triggered by pressing enter?
Yeah I understand that is not the common case than the suffix action is the same as submitting the form. But I really need the suffix action for mobile and still being able to submit it with enter in desktop. After all this is a chat application and there is only one input field. I was hopping for a way to overwrite the default behaviour. Seems like I would have to find a work around. Thanks for your reply!
5 replies