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

Tables not shown after updating to v2.3 #50

Open
farouqariff opened this issue Feb 21, 2024 · 10 comments
Open

Tables not shown after updating to v2.3 #50

farouqariff opened this issue Feb 21, 2024 · 10 comments

Comments

@farouqariff
Copy link

I come from v2.2 and I implement it on my Laravel project. I don't know why but after updating to v2.3 suddenly the tables were not able to displayed. When I check on Inspect page, it said "app.js:17 [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.". Hope Mr. Denis can help me on solving this issue.

@deniskoronets
Copy link
Owner

we don't have 2.3. Latest stable version is v.2.2. Do you use vuejs in your project?

@farouqariff
Copy link
Author

farouqariff commented Mar 19, 2024

Because when I composer update, suddenly I got this message, "- Installing woo/laravel-grid-view (2.3): Extracting archive" so I thought that the package has been updated and that was why like suddenly the table was not displayed with Vue warn message. After that, even after downgrading or like specifying the version at composer.json, it still do not fix the issue. In my project, we don't use vuejs, we are only using Laravel 9 with PHP 8.1.6 .

@SunnnyGohil
Copy link

I have vue js on my project and i am facing same issue

@SunnnyGohil
Copy link

@farouqariff did you fixed the issue?
If yes then please write here.

@deniskoronets
Copy link
Owner

@SunnnyGohil this gridview uses vue for rendering. If you have your gridview rendered within vue-handled component you might get vue warning that it doesn't support script inject into vue component.

if you have the following error please try out creating your grid with 'standaloneVue' => true in your config and registering this component in your vue instance:
https://github.com/deniskoronets/Laravel-GridView/blob/master/resources/js/GridView.vue

@deniskoronets
Copy link
Owner

or please provide some detailed screenshots/logs of error so I could assist you

@SunnnyGohil
Copy link

SunnnyGohil commented May 1, 2024

[
Screenshot from 2024-05-01 22-36-21
]

received this error in console

@SunnnyGohil
Copy link

SunnnyGohil commented May 1, 2024


use App\Models\User;
?>
@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header">{{ __('Users') }}</div>
            <div class="pull-right" style="margin:5px;">
                <a class="btn btn-success" href="{{ route('users.create') }}"> Create New User</a>
            </div>
    @if ($message = Session::get('success'))
        <div class="alert alert-success">
            <p>{{ $message }}</p>
        </div>
    @endif
    
@grid([
    'dataProvider' => $dataProvider,
    'columns' => [
        [
            'class' => 'raw',
            'title' => 'Name',
            'value' => function($data){
                return $data->name;
                
            },
        ],
        [
            'class' => 'raw',
            'title' => 'Email',
            'value' => function($data){
                return $data->email;
                
            },
        ],
        [
            'class' => 'raw',
            'title' => 'Status',
            'value' => function($data){
                return $status= isset(User::getUserStatus()[$data->status])?User::getUserStatus()[$data->status]:"";
                
            },
        ],
        [
            'class' => 'raw',
            'title' => 'WorkPlace Status',
            'value' => function($data){
                return $status= isset(User::getUserStatus()[$data->wp_status])?User::getUserStatus()[$data->wp_status]:"";
                
            },
        ],
        [
            'class' => 'actions',
            'value' => [
                'edit:/users/{id}/edit', // {id} - will be replaced with an attribute from row
                'delete:/users/{id}/destroy', // {id} - will be replaced with an attribute from row
            ]
        ]
    ]
])

@endsection

this is the my code

@farouqariff
Copy link
Author

@farouqariff did you fixed the issue? If yes then please write here.

I replace this package with laravel-grid-view by itstructure..
https://github.com/itstructure/laravel-grid-view

@SunnnyGohil
Copy link

@farouqariff

thanks for the suggestion I will update.

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

3 participants