GithubHelp home page GithubHelp logo

saade / filament-adjacency-list Goto Github PK

View Code? Open in Web Editor NEW
73.0 4.0 13.0 4.02 MB

A Filament package to manage adjacency lists (aka trees).

Home Page: https://filamentphp.com/plugins/saade-adjacency-list

License: MIT License

JavaScript 7.51% PHP 75.42% CSS 0.05% Blade 17.01%
adjacency-list filament form-builder laravel tree

filament-adjacency-list's People

Contributors

atmonshi avatar dependabot[bot] avatar github-actions[bot] avatar iotron avatar ribesalexandre avatar saade avatar tlegenbayangali avatar vanhooff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

filament-adjacency-list's Issues

[Bug]: Cannot Reorder, Undefined array key "children"

What happened?

I cannot reorder my items in the list, or make an item a subitem. I can create a child perfectly fine though.

The data in the database is this:
{"f692b5e5-2cc9-41ad-9b5a-79ea86d1f0b4":{"label":"lol","children":[],"url":null},"4a463f2d-e261-4fb7-bb1b-f130c9cdea64":{"label":"lol2","children":[],"url":null}}

I am using this form on a settings page (package)

How to reproduce the bug

No idea to be honest. It might be because i am doing it in a settings page.

Package Version

3.1.0

PHP Version

8.1

Laravel Version

10

Which operating systems does with happen with?

Windows

Notes

No response

[Bug]: Error when using form on widget

What happened?

I want to display adjecency list as widget on top of list page but when I try pass data from page table to widget it seems error or not working

How to reproduce the bug

I make widget resource and put it on list page and try to access data from widget with dd it seems appear but when I try to fill the form then this error happend foreach() argument must be of type array object null given

Package Version

3.1

PHP Version

8.1.17

Laravel Version

10.10

Which operating systems does with happen with?

Windows

Notes

No response

[Bug]: Throwing errors when not using relationships

What happened?

Upgraded the package from 3.1.2 -> 3.2.0 and now List is throwing errors about releationships and missing traits.

Adding the trait to my model, however causes the form to break, since it is looking for a relationship on the AdjacencyList component.

https://flareapp.io/share/NPLWWAQm

How to reproduce the bug

AdjacencyList::make('items')
      ->columnSpanFull()
      ->form([
          Forms\Components\TextInput::make('label')
              ->required(),
          Forms\Components\TextInput::make('url')
              ->required(),
          Forms\Components\Select::make('target')
              ->options(...),
          Forms\Components\CheckboxList::make('rel')
              ->columnSpan(1)
              ->columns(3)
              ->options(...,
      ]),

Package Version

v3.2.0

PHP Version

8.2

Laravel Version

10.0

Which operating systems does with happen with?

macOS

Notes

No response

[Bug]: When you move items they disappear

What happened?

You want to change the level of an item or a group

How to reproduce the bug

You have a list of items when you edit the resource, you move the item/group to root or another level

11-09-2023_14-47-31.mp4

Package Version

3.x

PHP Version

8.2.0

Laravel Version

10.22.0

Which operating systems does with happen with?

Linux

Notes

No response

[Bug]: Overrides standard components in Filament

What happened?

Our ordinary classes like buttons is overrided with white background with this plugin.

How to reproduce the bug

When I install the plugin

Package Version

3.1.0

PHP Version

8.1

Laravel Version

10

Which operating systems does with happen with?

No response

Notes

No response

[Bug]: Modal disappers when adding child item

What happened?

While adding child items to a primary node, the modal closes unexpectedly but the modal backdrop remains.

How to reproduce the bug

Install the plugin. Add first item with at least one child item. Then, create another top node item and attempt to add a child item to the new node.

adjacency-list-bug.mov

Package Version

3.x

PHP Version

8.1

Laravel Version

10

Which operating systems does with happen with?

macOS

Notes

No response

[Bug]: Error in create resource

What happened?

Add in form

public static function form(Form $form): Form
    {
        return $form
            ->schema([
                AdjacencyList::make('Subjects')
                    ->form([
                        Forms\Components\TextInput::make('name')
                            ->required(),
                    ])
                ->labelKey('name')
            ]);
    }

image

image

image

Illuminate\Database\Grammar::parameterize(): Argument #1 ($values) must be of type array, string given, called in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Grammars/Grammar.php on line 1040

How to reproduce the bug

Create new resource

Add items

Save resource

Package Version

3.0.3

PHP Version

8.2.9

Laravel Version

10.20.0

Which operating systems does with happen with?

Linux

Notes

No response

[Bug]: Actions are not configurable

What happened?

Actions are not configurable

How to reproduce the bug

When trying to configure actions, such as the edit action, it doesn't seem to work.

For example, using:

AdjacencyList::make('descendants')
    ->label('Subcategories')
    ->editAction(fn(Action $action) => $action->slideOver())
    ->labelKey('name')
    ->relationship('descendants')
    ->form([
        Forms\Components\TextInput::make('name')
            ->required(),
    ]),

Doesn't seem to apply the slideOver() method correctly. However, if you manually add slideOver() to the action in the source code, it works, indicating that something is off with how the configurations are passed through. This issue occurs for all actions.

Here's the relevant source code:

public function getEditAction(): Actions\Action
{
    $action = Actions\EditAction::make()->slideOver(); // Testing here works
    if ($this->modifyEditActionUsing) {
        $action = $this->evaluate($this->modifyEditActionUsing, [
            'action' => $action,
        ]) ?? $action;
    }
    return $action;
}

It seems the configuration isn't being applied as expected when using the method to modify the edit action.

Package Version

v1.22

PHP Version

v8.3.4

Laravel Version

v11.9.2

Which operating systems does with happen with?

macOS

Notes

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.