livewire-datatables icon indicating copy to clipboard operation
livewire-datatables copied to clipboard

Dark Mode Support and Authentication

Open AdamKyle opened this issue 4 years ago • 0 comments

I did not see this in your docs, I am curious if you support dark mode or not. If not, is there some way I can add it with out editing the vendor files for future updates?

I also noticed the table will not work, that is you cannot use pagination if you are logged out. For example:

namespace App\Flare\View\Livewire;

use App\Flare\Models\Item;
use Mediconesystems\LivewireDatatables\Column;
use Mediconesystems\LivewireDatatables\Http\Livewire\LivewireDatatable;
use Mediconesystems\LivewireDatatables\NumberColumn;

class ItemsTable extends LivewireDatatable
{

    public function builder()
    {
        return Item::query()->whereNotIn('type', ['quest', 'alchemy'])->whereNull('item_prefix_id')->whereNull('item_suffix_id');
    }

    public function columns()
    {
        return [
            NumberColumn::name('id')
                ->label('ID'),

            Column::name('name')
                ->label('Name'),

            NumberColumn::name('cost')
                ->label('Gold Cost'),
        ];
    }
}

This will load when logged out, but clicking on the pagination gives me a 302 and states I have to login. Is there a way to disable that? Or maybe it's a user error of some kind? Once I login the table works fully, but I also need it to work when the user is not logged in.

AdamKyle avatar Feb 23 '22 17:02 AdamKyle