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

color_picker doesn't work #4768

Closed
miquelangeld opened this issue Nov 8, 2022 · 1 comment
Closed

color_picker doesn't work #4768

miquelangeld opened this issue Nov 8, 2022 · 1 comment
Labels

Comments

@miquelangeld
Copy link

Bug report

What I did

Add a color_picker form field
`
$this->crud->addField([ // color_picker
'label' => 'Color',
'name' => 'color',
'type' => 'color_picker',
'default' => '#000000',

        'color_picker_options' => [
            'customClass' => 'custom-class',
            'horizontal' => true,
            'extensions' => [
                [
                    'name' => 'swatches', // extension name to load
                    'options' => [ // extension options
                        'colors' => [
                            'primary' => '#337ab7',
                            'success' => '#5cb85c',
                            'info' => '#5bc0de',
                            'warning' => '#f0ad4e',
                            'danger' => '#d9534f'
                        ],
                        'namesAsValues' => false
                    ]
                ]
            ]
        ]
    ]);

`

What I expected to happen

To get a Color picker

What happened

I get a color picker, but it doesn't work. I get an error in console: Uncaught TypeError: No method named "getTipElement"

What I've already tried to fix it

I tried with and without options, just the

`

 $this->crud->addField([   // color_picker
        'label'                => 'Color',
        'name'                 => 'color',
        'type'                 => 'color_picker',
        'default'              => '#000000',
    ]);

`

Is it a bug in the latest version of Backpack?

After I run composer update backpack/crud the bug... is it still there?

Yes

Backpack, Laravel, PHP, DB version

PHP VERSION:

PHP 8.1.12 (cli) (built: Oct 28 2022 17:39:37) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.12, Copyright (c) Zend Technologies
with Zend OPcache v8.1.12, Copyright (c), by Zend Technologies
with Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans

LARAVEL VERSION:

v9.37.0@0c9675abf6d966e834b2ebeca3319f524e07a330

BACKPACK VERSION:

5.4.7@6e1bb116de9f3091530cb9b11edcceb4d252daa8

@miquelangeld
Copy link
Author

Ok, It's a conflict with my app.js

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

No branches or pull requests

1 participant