Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multipleSelectTable 在 select 的 when 条件中只能单选 #30

Open
trappistes opened this issue Oct 21, 2022 · 0 comments
Open

multipleSelectTable 在 select 的 when 条件中只能单选 #30

trappistes opened this issue Oct 21, 2022 · 0 comments

Comments

@trappistes
Copy link

trappistes commented Oct 21, 2022

$form->select('type')
...
->when(10, function (Form\NestedForm $form) {
    $form->selectTable('approvers')
        ->dialogWidth('50%') 
        ->from(UserTable::make(['company_id' => $this->company->id]));
})
->when(20, function (Form\NestedForm $form) {
    $form->multipleSelectTable('approvers')
        ->dialogWidth('50%') 
        ->from(UserTable::make(['company_id' => $this->company->id])); 
})

满足第一个条件时单选没有问题,满足第二个条件时仍然只能单选
调换顺序之后两个都可以多选

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant