Comments (4)
Ah, finally I got it.
Tried so hard to use native table-action. But I had to simple override the package-action.
protected function configureEditAction(Actions\EditAction $action): Actions\EditAction {
$action->link()->url(fn(Page $page) => route('filament.admin.resources.pages.edit', $page->id));
return $action;
}
Thank you!
from filament-tree.
yes, but i think they are extending the same filament Action
from filament-tree.
yes you can do that, by enabling the function hasView for example make it return true , and then use the confugureViewAction method override it then use URL to redirect to the normal page of your table action
for example
use Filament\Tables\Columns\TextColumn;
TextColumn::make('title')
->url(fn (Post $record): string => route('posts.edit', ['post' => $record]))
from filament-tree.
Thank you.
The problem is, I can not override the configureViewAction-method (or any other viewMethods) because it have to has the same declaration as it has in the BasePage-Class.
In short I can not change the type of the given action in the method, so the following code will end in declaration-error.
use Filament\Tables\Actions\EditAction;
protected function configureEditAction(EditAction $action): EditAction
{
return parent::configureEditAction($action)
->authorize(fn (Model $record): bool => static::getResource()::canEdit($record));
}
It has use the EditAction from
SolutionForest\FilamentTree\Actions\EditAction
not the table-action (or any other native actions from filament)
from filament-tree.
Related Issues (20)
- `php artisan view:cache` Throws an Exception HOT 4
- Duplicate Name and Slug Per Level
- Drag-to-Reorder Handle Coloring in "Dark Mode" HOT 1
- Drag and drop doen't work properly on RTL layout HOT 1
- Tree does not show up in widget HOT 2
- Support filter , tab on tree HOT 13
- SolutionForest\FilamentTree\Support\Utils::buildNestedArray returns empty array when using null as parentId HOT 4
- When Dragging and Dropping the tree element Save HOT 5
- Max Depth not working - unable to make tree with more parents than 1 HOT 2
- Change View with toggle HOT 2
- -1 default parent id results in errors when trying to access parents HOT 1
- Cannot read properties of undefined (reading 'nestable') HOT 5
- Uncaught TypeError: $(...).nestable is not a function
- Cannot read properties of undefined (reading 'fn')
- EditAction::isModalHidden does not exist HOT 1
- Create and edit pages instead of modal style. HOT 1
- Edit action does not work: method sholdOpenModal does not exists HOT 2
- use of nested-sort instead of jquery HOT 1
- How use this plugin with Filament Modules
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filament-tree.