Is it possible that based on the value of the component other component is not visible

Hi everyone how i can make that when mine component radio value is interval then i show mine component when is something else do not show
6 Replies
toeknee
toeknee3d ago
Yes with form fields
mile4841
mile48413d ago
public function form(Form $form) :Form { return $form->schema([ Section::make(("inputs.statistics-table-title")) ->schema([ Radio::make("type_report") ->label(("inputs.statistics-report-type")) ->options([ "true" => ("inputs.statistics-report-success"), "false" => ("inputs.statistics-report-unsuccess"), "all" => ("inputs.statistics-report-all"), ]) ->inline() ->inlineLabel(false) ->default("true") ->columnSpan(1), Radio::make("time") ->options([ "interval" => ("inputs.statistics-time-interval"), "all" => ("inputs.statistics-time-all"), ]) ->live() ->default("interval") ->inline() ->inlineLabel(false) ->columnSpan(1), Grid::make(2) ->schema([ DatePicker::make("start_date") ->label(("inputs.statistics-start-date")) ->native(false), DatePicker::make("end_date") ->label(__("inputs.statistics-end-date")) ->native(false) ])->columnSpan(1), ])->columns(3) ]); }
mile4841
mile48413d ago
thanks bro i now understand what i have to do but i can not try it because in mine console i am getting the liwire error [wire:model="type_report"] property does not exist on component: [app.filament.pages.statistics] I am using the custom livewire page
toeknee
toeknee3d ago
means you have defined type_report somewhere but it's not a function on the page
mile4841
mile48413d ago
that is how i named mine component
Want results from more Discord servers?
Add your server