Skip to content

Select options depending of previous select ? #2441

Answered by tabuna
BorisDemay asked this question in Q&A
Discussion options

You must be logged in to vote

A recent example, where a select change the option of another. As an illustrative example, this should work.

  1. Create a new screen with the following content:
<?php

namespace App\Orchid\Screens;

use App\Orchid\Layouts\BookSelector;
use Orchid\Screen\Screen;
use Illuminate\Support\Collection;

class BookScreen extends Screen
{
    /**
     * Query data.
     *
     * @return array
     */
    public function query(): iterable
    {
        return [];
    }

    /**
     * Display header name.
     *
     * @return string|null
     */
    public function name(): ?string
    {
        return 'BookScreen';
    }

    /**
     * Button commands.
     *
     * @return \Orchid\Screen\Action[]

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BorisDemay
Comment options

Answer selected by BorisDemay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants