Form component visability base on select value not working.

This is the select
Forms\Components\Select::make('type')
    ->live()
    ->required()
    ->options(AssessmentTypes::class),

and this is the field I'm trying to show/hide
Forms\Components\TextInput::make('questions_count')
    ->visible(fn (Get $get): bool => $get('type') == AssessmentTypes::QUIZ || $get('type') == AssessmentTypes::EXAM )
    ->numeric(),

Can anyone tell me what I am doing wrong?
Was this page helpful?