GithubHelp home page GithubHelp logo

Comments (2)

aymanalhattami avatar aymanalhattami commented on July 23, 2024

Adding the missing part is rendering correctly the panel

In view and edit page, If you want to show the relation managers and tabs, you need to copy the code form filament\resources\view\resources\pages\view-record and filament\resources\view\resources\pages\edit-record and paste it to your custom blade file.

Idea:

  • is it maybe possible to overwrite the layout instead of using a specific view ?
  • A dynamic call of the component that should have been called ?

Can you provide more details about your idea?

from filament-page-with-sidebar.

Thiktak avatar Thiktak commented on July 23, 2024

Yes, a copy of the code is a solution, but this means that if filament is updating something we will have to update evrything :(

Is it maybe possible to overwrite the layout instead of using a specific view ?

We have the possibility to overwrite the $view but also the $layout.
Maybe we can find a way to use the $layout, with a custom one (with the sidebar) that will (automatically) surround the current component + call the previous layout defined ?

I tried some simple code, but nothing very interesting here for now.

A dynamic call of the component that should have been called ?

This idea is to call dyamically the correct [View/Edit/...]Record page with the $this context parameter.
I found @livewire($componentName), <x-dynamic-component :component="$componentName" /> or even <livewire:is :component="$componentName" />

I tried some simple code, but nothing very interesting here for now.

Another idea (will test tonight), could be to call an @include of the corresponding view object (specified as constant or dynamically determined).

<x-filament-page-with-sidebar::page>
    @include($this->getChildComponentView())
</x-filament-page-with-sidebar::page>

And getChildComponentView could be a ReflectionClass::getDefaultProperties to get the parent default value's $view of the component.

Just some idea :)

from filament-page-with-sidebar.

Related Issues (20)

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.