-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Adding AdjacencyListWidget #32
Conversation
Bumps [ramsey/composer-install](https://github.com/ramsey/composer-install) from 2 to 3. - [Release notes](https://github.com/ramsey/composer-install/releases) - [Commits](ramsey/composer-install@v2...v3) --- updated-dependencies: - dependency-name: ramsey/composer-install dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.6.0 to 2.1.0. - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](dependabot/fetch-metadata@v1.6.0...v2.1.0) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
…ey/composer-install-3 chore(deps): bump ramsey/composer-install from 2 to 3
…ndabot/fetch-metadata-2.1.0 chore(deps): bump dependabot/fetch-metadata from 1.6.0 to 2.1.0
# Conflicts: # README.md
# Conflicts: # README.md # resources/dist/filament-adjacency-list.css # resources/dist/filament-adjacency-list.js # resources/js/index.js # resources/views/builder.blade.php # resources/views/components/item.blade.php
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.1.0 to 2.2.0. - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](dependabot/fetch-metadata@v2.1.0...v2.2.0) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…ndabot/fetch-metadata-2.2.0 chore(deps): bump dependabot/fetch-metadata from 2.1.0 to 2.2.0
Hey! Thanks for the PR and sorry for the delay on reviewing it. I've made some changes so the code became more cleaner and customizable, please, lmk wyt. 1. A new customization aproach.Instead of defining each method again and hard coding the component on the form, users can now use the class MyWidget extends AdjacencyListWidget {
protected function adjacencyList(AdjacencyList $adjacencyList): AdjacencyList {
return $adjacencyList
->label('Foo')
->editable()
->labelKey('nombre')
->childrenKey('hijos');
}
} 2. Item actions and urlInstead of using the class MyWidget extends AdjacencyListWidget {
protected function adjacencyList(AdjacencyList $adjacencyList): AdjacencyList {
return $adjacencyList
->itemAction('edit') // or view, delete, moveUp, indent etc ...
->itemUrl(
fn (array $item) => YourResource::getUrl('view', ['record' => $item['id']]) // for example
)
}
} 3. Miscellaneous
Let me know what you think! |
Adding a widget, plus a few bug fixes.