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

Weird behavior with checkboxes in table layout #920

Closed
mojtabaahn opened this issue Jul 29, 2019 · 4 comments
Closed

Weird behavior with checkboxes in table layout #920

mojtabaahn opened this issue Jul 29, 2019 · 4 comments

Comments

@mojtabaahn
Copy link
Contributor

It used to work well on v5.2 i believe.

Expected Behavior

By clicking a checkbox or it's label, it has to get toggled.

Actual Behavior

When having multiple rows on a table, by clicking any checkbox it has a chance to randomly toggle some previous checkbox !

Steps to Reproduce the Problem

  1. Fresh installation of laravel
  2. Fresh installation of orchid 5.3 | 5.4
  3. Seeding User table by adding factory(\App\User::class, 20)->create(); to DatabaseSeeder.php and running php artisan db:seed
  4. Replacing first Column of UserListLayout.php with below code
TD::set('id', 'ID')
                ->render(function (User $user){
                    return CheckBox::make('users[]')
                        ->value($user->id)
                        ->placeholder($user->getNameTitle())
                        ->checked(false)
                        ->render();
                }),

Specifications

  • ORCHID Version:5.3 , 5.4
  • Laravel Version: 5.8
  • PHP Version:7.2
  • Database Version: SQlite

Screen capture

c89bcc10-095c-45ab-946d-84b1ad77f72d

@tabuna
Copy link
Member

tabuna commented Jul 29, 2019

This is a problem because all your fields have the same name.

#874

An earlier example

i will try to solve it as soon as possible

tabuna added a commit that referenced this issue Jul 29, 2019
@tabuna
Copy link
Member

tabuna commented Jul 30, 2019

Did you manage to reproduce the problem after the update?

@mojtabaahn
Copy link
Contributor Author

just checking..

@mojtabaahn
Copy link
Contributor Author

Works well, Thanks!

@tabuna tabuna closed this as completed Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants