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

Toggle switch on/off not working #6272

Open
Radio-Skonto opened this issue Apr 19, 2024 · 5 comments
Open

Toggle switch on/off not working #6272

Radio-Skonto opened this issue Apr 19, 2024 · 5 comments

Comments

@Radio-Skonto
Copy link

Describe the bug
Not working onIndex toggle switch, however in Edit mode work perfectly

To Reproduce
S7, PHP8.3, Nginx, Postgres15, EA 4.9.4

@dwd-akira
Copy link
Contributor

dwd-akira commented Apr 23, 2024

It works for me.
Toggle switch in index is an ajax request, look the response in the debugger.

@Radio-Skonto
Copy link
Author

On debugger nothing - no AJAX request at all, no errors..

@lgeorgiev
Copy link

lgeorgiev commented May 18, 2024

It doesn't work properly for me when I use the generator.
Then the fields are not specified explicitly.

class ProductCrudController extends AbstractCrudController
{
    public static function getEntityFqcn(): string
    {
        return Product::class;
    }

    /*
    public function configureFields(string $pageName): iterable
    {
        return [
            IdField::new('id'),
            TextField::new('title'),
            TextEditorField::new('description'),
        ];
    }
    */
}

There is a switch on the index page, but it doesn't work.
After I add BooleanFiled::new it works fine.

@simoheinonen
Copy link
Contributor

Could be PATCH not being handled properly by your server. See #6294

@zorn-v
Copy link
Contributor

zorn-v commented May 21, 2024

Could be PATCH not being handled properly by your server.

Nope, you just need to explicit define BooleanField on index like there #6297 )

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

5 participants