Giter Site home page Giter Site logo

momentum-modal's People

Contributors

altercode avatar choowx avatar josemariagomez avatar laravel-shift avatar lepikhinb avatar rovansteen avatar vmitchell85 avatar yoeriboven 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  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  avatar  avatar  avatar  avatar  avatar

momentum-modal's Issues

Shared props issues

While using your great package (thanks!), I noticed that the approach sometimes does not generate the desired output. For example, my HandleInertiaRequests middleware returns the breadcrumbs for every request but when I render a modal the breadcrumbs of the background page are obviously not correct because the route of the modal is used. In general, I think as soon as the shared props are different for modal and background page it causes issues. Should the middleware hence run twice? Not sure how Laravel will behave then so it's more like an architectural question.

Collaboration?

First of all, thanks for your great library since it helped me a lot to set up modal behaviour in Inertia โœŒ๏ธ However, after a while I felt that it still needed some tweaks and eventually I started on working on my own solution. You can find the result at https://github.com/navigarejs/framework which comes with nested modal behaviour which can be completely configured to your needs (e.g. custom transitions). This is just one feature among others:

  • Complex layouts with persistent parts (e.g. headers) or stacked fragments (e.g. modals)
  • Preloading of links
  • Route injection without any client overhead
  • (Optional) real-time form validation via Precognition
  • Built-in (optional) SSR support from the beginning

It would be great to see if you would like to help working on it and get your insights ๐Ÿ˜Š

baseRoute method does not respect the middleware

My route.php look like the following. Each time the URLs are hit the ModifyParameters middleware is supposed to be executed.

Route::group(['middleware' => [ModifyParameters::class]], function () {
    Route::resource('users', UserController::class);
});

My UserController looks like the following:

function index()
{
  return inertia('Customers/Index', []);
}

// runs when I hit mydomain.com/users/create
function create()
{
   return Inertia::modal('Users/Create', [])
    ->baseRoute('users.index');
}

Everything works perfectly except when the URL "mydomain.com/users/create" is hit directly from the address bar of the browser.

When the create method is hit, the Inertia::modal method runs the baseRoute method to render the page in the "index" method of the controller, however during the process it does not execute the middleware "ModifyParameters".

It respects the __construct method of the controller, but is there any way to make it execute the middleware defined in the route?

Call to a member function with() on null

I have this in my controller but i keep getting

Call to a member function with() on null

Here's what i have in my controller

class ShowTweet extends Controller
{
    public function __invoke(User $user, Transactions $tweet)
    {
        return Inertia::modal('Users/Details')
            ->with([
                'user' => auth()->user(),
                'tweet' => [
                    'user' => 'John doe',
                    'tweet' => 'Oge has a big head'
                ],
            ])
            ->baseRoute('get.users', $user);
    }
}

Consider moving the npm package into the same repo

To avoid unexpected version mismatch, better VCS control and easier PRs consider moving the npm package repo into this repository and unpublishing the package

Then to install the plugin, the command would simply be npm i vendor/based/momentum-modal/vue-3

You could even do that automatically when the composer package is installed

Support lazy props - same behaviour as Inertia

Hi, I noticed lazy props are not possible with the modal thingy:

public function create(): Modal
{
    return Inertia::modal('Admin/Classrooms/Create')
        ->with([
            'closureLazy' => fn () => User::all(),
            'inertiaLazy' => Inertia::lazy(fn () => User::all()),
        ])
        ->baseRoute('admin.classrooms.index');
}

How difficult is to add this behaviour, does it differ much from the original behaviour that Inertia has?

P.S. Love your work.

Vue 2

is there a reason to work only on vue 3 ? i've a proyect with vuetify and vue 2 and i would like to use this awesome package .. it's possible to make a PR to add support for vue 2 ?

Issue with Modal with latest version

I have upgraded the project to latest version of Inertiajs and its related Laravel dependency. However it is noted that the momentum-modal doesn't seem to open up, as usual after the upgrade. I did update the axios version to latest 1.2.0. I have tested with inertia-laravel package with latest version ("inertiajs/inertia-laravel": "^0.6.9").

Params are not being passed to baseRoute

Hi!

I have problem that my background route is rendered but the underlaying model is an empty instance.

When i manualy go to /calendars/6/edit i can see calendar data.
But visiting modal page /days/1/edit there is no calendar data in baseRoute.

this is my baseRoute controller method

public function edit(Calendar $calendar)
{
  $calendar->load('days');

  return Inertia::render('Calendars/Edit', [
  'calendar' => $calendar
  ]);
}

this is my modal controller:

<?php

namespace App\Http\Controllers;

use App\Models\Day;
use Inertia\Inertia;

class DayController extends Controller
{
    public function edit(Day $day)
    {
        $day->load('calendar');

        return Inertia::modal('Days/EditModal')
            ->with([
                'day' => $day
            ])->baseRoute('calendars.edit', $day->calendar);
    }
}

my routes are defined as:

Route::get('/calendars/{calendar}/edit', [CalendarController::class, 'edit'])->middleware(['auth', 'verified'])->name('calendars.edit');
Route::get('/days/{day}/edit', [DayController::class, 'edit'])->middleware(['auth', 'verified'])->name('days.edit.modal');

What am I missing here?

PHPStan throws undefined static method using modal method

Just recently I started seeing this following phpstan/larastan issue.

Call to an undefined static method Inertia\Inertia::modal().

Which my controller looks a litttle somthing like

<?php

namespace App\Http\Controllers;

use Inertia\Inertia;
use Momentum\Modal\Modal as InertiaModal;

class FolderController extends Controller
{
    public function __invoke(): InertiaModal
    {
        return Inertia::modal('Folder/Create')->baseRoute('home');
    }
}

and my phpstan.neon is using the base configuraiton

includes:
    - ./vendor/nunomaduro/larastan/extension.neon

parameters:
    paths:
        - app

    level: 5

    ignoreErrors:

    excludePaths:

    checkMissingIterableValueType: false

Any idea's or something I must add to my phpstan.neon? The method works fine still, just trying to clean up stan issues.

TransitionRoot animation skipped when navigating

A thing I noticed with Inertia, Headless UI, and using TransitionRoot is that it will skip the configured transition (or end it early) when navigating to or away from the modal route. Had a similar experience with a custom implementation. Kind of depends on how fast the route loads. When navigating to, it usually just pops up without transition. When navigating away, it starts but abruptly hides the modal when halfway.

I assumed @after-leave="redirect" would take care of this because it only starts navigating after the transition ended, but it doesn't.

Is there a way to fix this or configure it differently so it would fully transition in and out when navigating routes?

syntax error, unexpected token ")"

Hi!

i have simple form, but when i access route, I get an error in this section

{

    /** @var \Illuminate\Routing\Router */

    $router = app('router');



    $middleware = new SubstituteBindings($router);



    return $middleware->handle(

        $request,

        $route->run(...)

    );

}

Header X-Inertia-Modal-Redirect - CORS issue

Hi,
I am using the momentum modal in a project but I run into a CORS issue.

On mount the base route is fetching some currency rate from http://www.geoplugin.net/json.gp,
but when I load the page from the modal's address I get a CORS issue because of the X-Inertia-Modal-Redirect.

Any way I could circumvent this without asking Geoplugin.net to whitelist the header, or doing this in the backend?

Thanks, appreciated.

Overlapping props and redirect to base route from controller

I'm very much liking this package and have successfully implemented except for a few issues.

The first issue is that I'm having to name the form used in the modal differently to an existing form in the base route.
For example, let's say I have an organisation and a contact with the name attribute. When opening the contacts modal, the name seems to be overwritten (at least initially) with the name attribute from the base organisation. I fixed this issue by renaming the form for the contacts modal to contactForm but I'm wondering why it the occurs in the first place.

// Setup method in base route (i.e. 'organisation.edit')
setup() {
    const form = useForm({
        name: null,
    })
    return {
        form,
    }
},

// Setup method in base route (i.e. 'contacts.edit')
setup() {
    const form = useForm({ // issue can be fixed by renaming to contactForm =
        name: null,
    })
    return {
        form,
    }
},

The second issue is that I would like to redirect to the previous base route (not the default one) when updated. Doing the following in keeps the modal open:

return Redirect::back()->with('success', 'Contact updated');

Is there anyway of determining what the current base route is so I can redirect to it without having to close the modal from the frontend?

I did see some responses in #29 that may help with this...

[Help] Can't get the modal to display

I'm using vite, here is my setup:

createApp({ render: () => h(App, props) })
  .use(modal, {
    resolve: (name) => {
      console.log(name)
      return resolvePageComponent(name, import.meta.glob('./Pages/**/*.vue'))
    },
  })

I'm returning an Inertia::modal() and when inspecting the props, the modal object is correct with my props and the component, the base route is displaying correctly, but no modal is launching.

I've put a console log in the resolve function, but I never get any logs. Any idea why the modal isn't showing?

Navigating from a modal to another modal displays the current modal again

In my application, I have a modal that should redirect to another modal:

public function show(Leg $leg)
{
    $this->authorize('view', $leg);

    return inertia()->modal('passengers.attach', [
        'leg' => LegData::from($leg),
        'contacts' => $leg->passengers,
    ])->baseRoute('booking.index', ['scope' => 'upcoming']);
}

public function create(Leg $leg)
{
    $this->authorize('view', $leg);

    return inertia()->modal('passengers.create', [
        'leg' => LegData::from($leg),
    ])->baseRoute('booking.index', ['scope' => 'upcoming']);
}

The first modal opens correctly, but for some reason, when navigating to the second modal with Inertia.get('/path-to-second-modal'), the render method of Momentum\Modal\Modal is executed twice. The first time, it returns the proper Inertia response, with the right component, but the second time, it returns the initial response:

CleanShot.2022-06-29.at.15.56.28.mp4

Can't get validation to work on form inside modal

Hi!

I have a simple create form, where I am trying to get Form Validation to work:

image

As you can see in the above code it doesn't seem to validate the request when I click on "Create"

I have the below Create.vue form:

//Create.vue
<script setup>
import Modal from "@/Pages/Modal";
import CreatePipelineForm from "@/Pages/Pipeline/Partials/CreatePipelineForm";

</script>

<template>
    <Modal>
        <template #title> Create Pipeline </template>
        <CreatePipelineForm />
    </Modal>
</template>

Inside this create modal, I have a component called CreatePipelineForm:

//CreatePipelineForm.vue
<template>
    <studio-form-section @submitted="createPipeline">
        <template #form>
                <div class="col-span-6">
                    <text-input v-model="form.name" label="Name" :error="form.errors.name"></studio-input>
                </div>
        </template>
        <template #actions>
            <loading-button :loading="form.processing">
                Create
            </loading-button>
        </template>
    </studio-form-section>
</template>
<script setup>
import { useForm } from '@inertiajs/inertia-vue3';
import StudioFormSection from "@/Studio/FormSection";
import LoadingButton from "@/Studio/LoadingButton";

const form = useForm({
    name: '',
    output_type: 'text',
    description: '',
})

const createPipeline = () => {
    form.post(route('pipelines.store'), {
        errorBag: 'createPipeline',
        preserveScroll: true,
    })
}
</script>

Finally, below is the store() method in my controller:

public function store(Request $request)
{
    \Auth::user()
        ->currentTeam->pipelines()
        ->create(
            $request->validate([
                "name" => "required|string|min:3|max:255",
            ])
        );

    return redirect()
        ->route("pipelines.index")
        ->with("success", "Pipeline created successfully.");
}

Page title cannot be set from modal

The title of a page cannot be modified when visiting a "modal"-page.

When I add this to a regular page, it works:

<Head title="Modal - List - App name />

when I add it to a modal page, nothing happens.

Modal resets form fields

Im new with inertia and currently trying your package to implement the modal functionality.
Currently i can open the modal and perform a save action. If the save action gives a validation error the modal seems to flicker and resets the form fields values but shows the validation message.

Any idea where i should start looking at why this behaviour occurs? This does not occur in your example and works fine there.

Modal/Slide-over resets form fields

Hi,

I have a form in a slider over and when i click on submit, the form data is reset and i also dont see validation errors. Seems like its reloading the slide-over. Also the slide-over entrance animation is also not working.

I have checked all other issues.

I ran npm install momentum-modal@latest to get v0.2.1.

I have also checked to match axios version with inertia by running npm i [email protected]

But still when i submit the form, it reloads the slide-over. The form data and errors are reset.

Endless loop by accessing the model via its route

Hi @lepikhinb,

First of all, thanks for your package! It's feels like a Christmas present! ๐Ÿ˜„

There is something going on that I can't explain. When I access the modal directly through its URL, the page hangs and eventually gives a Maximum execution time of 60 seconds exceeded. I use the following code in the showLoginForm()-action in my default Laravel LoginController which is accessible by /login:

public function showLoginForm()
{
    return Inertia::modal('auth/Login')
        ->baseRoute('web.login');
}

Now I am debugging a bit and the following code seems to cause an endless loop:

public function toResponse($request)

public function toResponse($request)
{
    $response = $this->render();

    if ($response instanceof Responsable) {
        return $response->toResponse($request);
    }

    return $response;
}

Maybe you can explain what makes this happen?

Jeffrey

Possible to pass a URL to redirect function?

I have a situation where i redirect users conditionally. Would love know if there is a possibility to optionally pass a URL to the redirect() function of useModal() so that it redirects to intended page instead of baseRoute.

Here is what i am trying as a word around.

const props = defineProps({ redirectUrl: String })

const { show, close, redirect } = useModal()

const handleRedirect = () => {
    if (props.redirectUrl) {
        router.get(props.redirectUrl)
    } else {
        redirect()
    }
}
<TransitionChild @after-leave="handleRedirect">
...
</TransitionChild>

Redirecting from one modal to another

I've got two modals that share the same base url/route. In one modal, I'm making doing a form.put(), where the redirect should be a new modal.

It's currently sending the right redirect response from the first (as far as I can tell), and is GET calling the correct url of the second modal, but then it immediately GETs the base url.

Screen Shot 2022-09-26 at 11 38 43 AM

Modal component not loaded after login

When navigating to the modal url, without an authenticated session, the modal component is not loaded. Instead the login page is still showing. This happens also on the PingCrm example.

Steps to reproduce.
Go to https://modal.advanced-inertia.com/contacts/86/edit
Login with credentials provided.

We have need of a way to link directly to the modal from an email for example.

To bypass this we have implemented the Modal.php our self and commented out the following line.

    protected function redirectURL(): string
    {
        if (request()->header('X-Inertia-Modal-Redirect')) {
            /** @phpstan-ignore-next-line */
            return request()->header('X-Inertia-Modal-Redirect');
        }

        $referer = request()->headers->get('referer');

//        if (request()->header('X-Inertia') && $referer && $referer != url()->current()) {
//            return $referer;
//        }

        return $this->baseURL;
    }

Could not resolve "@inertiajs/vue3"

I follow all instruction regarding installation but after setup I get this error:

Could not resolve "@inertiajs/vue3"

node_modules/momentum-modal/dist/momentum-modal.js:2:42:
      2 โ”‚ import { usePage as E, router as I } from "@inertiajs/vue3";

I am using Laravel 9 and Vite 3.2 and this is my package.json:

{
    "private": true,
    "scripts": {
        "dev": "vite",
        "build": "vite build"
    },
    "devDependencies": {
        "@inertiajs/inertia": "^0.11.0",
        "@inertiajs/inertia-vue3": "^0.6.0",
        "@inertiajs/progress": "^0.2.7",
        "@tailwindcss/forms": "^0.5.3",
        "@vitejs/plugin-vue": "^3.0.0",
        "autoprefixer": "^10.4.12",
        "axios": "^1.2.0",
        "laravel-vite-plugin": "^0.7.0",
        "lodash": "^4.17.19",
        "postcss": "^8.4.18",
        "tailwindcss": "^3.2.1",
        "vite": "^3.0.0",
        "vue": "^3.2.41"
    },
    "dependencies": {
        "@headlessui/vue": "^1.7.5",
        "@heroicons/vue": "^2.0.13",
        "momentum-modal": "^0.2.1"
    }
}

Upgrade Inertia to V1.0 makes modals stop working

Upgraded to Inertia V1.0, followed the upgrade guide and everything works fine, except the momentum-modal.

Remember that the Axios version must be the same as Inertia, so upgraded Axios to V1.2.2, first, and after to V1.1.2. Doesn't solve the problem...

No console errors, nothing. The address bar changes to the correct value but nothing more.

Does anyone upgraded successfully to Inertia V1.0?

********************** Update **********************
Searched files in node_modules\momentum-modal for references needing update.

in the file momentum-modal.js updated the following lines:

import { usePage as b } from '@inertiajs/vue3';
import { router as E } from "@inertiajs/vue3";

The file momentum-modal.umd.cjs seems a little bit tricky.

Tried the following code:
typeof exports == "object" && typeof module < "u" ? t(exports, require("vue"), require("@inertiajs/vue3"), require("@inertiajs/inertia"), require("axios")) : typeof define == "function" && define.amd ? define(["exports", "vue", "@inertiajs/vue3", "@inertiajs/inertia", "axios"], t) : ((o = typeof globalThis < "u" ? globalThis : o || self), t((o["Momentum Modal"] = {}), o.vue, o.inertiaVue3, o.inertia, o.axios));

Still no success...

Use current page as baseRoute

Hi,

would it be possible to use the current page as a default baseRoute?
Example: I have a simple CRUD app, and the same base form in my create and edit pages.
Would it be possible to just automatically determine from where the request came from and use that as a backdrop?
Second thing, is there an option to not modify the URL at all? I've managed to partially implement it using redirect (from vue's useModal) , but it makes a redirect.

How to preserve component state?

Hey,

First of all great work on route-based modals and thanks for sharing it.

I am playing around with this package. I have a Vue component where I have a reactive property:

const tabs = reactive([
    { name: 'General', active: true },
    { name: 'Photos', active: false },
])

I jump around tabs by changing the active property of tabs. When i open up a modal from this component and when it comes back, the active tab is not the same.

<Link 
    :href="route('route.test')" 
    :data="{activeTab: 'Photos'}" 
    :only="['modal', 'flash']" 
    preserve-state 
    preserve-scroll
>
    Show All Photos
</Link>

I also tried to bind the active tab state to url param but that does not work as ->baseRoute() would not take url params.

How can i solve this issue?

Any kind of help would be appreciated.

Parameters for base url are passed

I'll start by saying how much I appreciate this package, I really like how it's working. Been adding it to one of my projects today and it's pretty magical. ๐Ÿ‘๐Ÿป

There seems to be a bug however. I spend quite a while looking into it but can't figure out what the best way to solve this would be. The problem occurs when the base route has parameters. It seems to reuse the parameters from the current route (= the modal route).

In my use case I have an edit form in a model. The base route is the index page with a month paramater. It's similar to this:

public function index(?string $month) {
    // This shows an overview, a list of all months or just the specified month
}

public function edit(Project $project) {
    return Inertia::modal('Project/Show')
        ->with([
            'project' => $project,
        ])
        ->baseRoute('projects.index', $project->month);
}

Instead of using the month from $project, it passes the resolved parameters from edit. This happens on this line: https://github.com/lepikhinb/momentum-modal/blob/master/src/Modal.php#L76. In the tests it seems to work, but that because the parameters of the original route and the base route are matching, in this method for example: https://github.com/lepikhinb/momentum-modal/blob/master/tests/Stubs/ExampleController.php#L17-L24

In my specific case I could fix the issue by replacing Route::current()?->parameters() ?? [] with $baseRoute->parameters(). But this way it just uses the value and does resolve any model bindings. Did spend quite some time trying to get the parameters to resolve, so I could create PR instead of an issue, but I ran out of time for this today.

Also found it does use the query data from the original route for the base route, not sure if that's by design? I can't think of a use case where that would be useful. This happens on this line: https://github.com/lepikhinb/momentum-modal/blob/master/src/Modal.php#L58

Hopefully this makes sense, let me know if you need more info or a sample project.

Feature request: remove modal from browsing history on closing

Hi!

My use case: I use this modal feature to view a dish on a menu in order to select associated toppings. The problem is that when somebody has viewed 10 dishes sequentially and goes back with the back button, all the modals reappear in the same order from history.

Seems logical considering how InertiaJS is put together, but perhaps it would be a nice addition to provide the ability to disable this behaviour for modals if desired.

Cannot run Inertia SSR server

Hello,

thanks for this package!

I've been having issues running the SSR server (Inertia & Vite) with momentum-modal. It compiles just fine with vite build --ssr, but when I run it with node bootstrap/ssr/ssr.mjs I get the following error:

SyntaxError: Named export 'modal' not found. The requested module 'momentum-modal' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'momentum-modal';
const { modal } = pkg;

When I then make these changes in ssr.ts I get the following error:

node_modules/momentum-modal/dist/momentum-modal.es.js:1
import { ref, computed, shallowRef, watch, defineAsyncComponent, h, nextTick, defineComponent } from "vue";

SyntaxError: Cannot use import statement outside a module

The actual app runs just fine, btw. It's just SSR. Any help would be greatly appreciated!

cannot figure how to set the package in a Breeze project.

Exception:

Screen Shot 2022-08-18 at 9 18 37 AM

Steps:

  • Create new project
  • Install Breeze with Vue
  • Run migrations
  • Install momentum-modal composer package
  • Install momentum-modal npm package
  • Install the Axios version supported for the package
  • Set the changes on resource/js/app.js as the package requires
  • Add a modal component resources/js/Components/Modal.vue
  • Add the momentum modal component to the Layout resources/js/Layouts/ApplicationLayout.vue
  • Then add a controller that points to a vue component with modal app/Http/Controllers/UsersController@create
  • Create the modal vue component resources/js/Pages/Users/CreateModal/vue
  • Set in the custom vue component the modal, importing your custom model and use it as a slot.

Here the project (is public): https://github.com/ArielMejiaDev/modal-tester

Problem with form in the modal body

Hi,
please, can you help me with this issue?

I have a modal with a form for creating a new user. Every time when I submit the form and get validation errors, the modal resets. Because of that, all inputs are empty and you must enter all data again. Also, I can't get errors for each input field from the "form" variable because errors are empty after resetting the form.

Also, when I submit the same form on the page (not in modal), everything works fine: the entered data remains and I get an array with validations errors.

I figured out that the modal is resetting after a few hours when I took a look at developers' tools on the "Elements" tag. I noticed that the modal element is shaded for a second after clicking on submit button, which means that some change has occurred on that element. I suppose that somehow modal is resetting and I don't know why.

Also, I downloaded the PingCRM example with modals and I check if there was any difference but it is almost the same as my code logic. There is nothing that will indicate the issue and I don't know which part of my code should I attach, but, if you have an idea and need some specific part of the code, please let me know!

Session store not set on request

Hey,

So I tried this out this morning since I'm implementing a modal in our app, but I had no luck making it work.

Using the following routes:

Route::inertia('/', 'index')->name('index');
Route::get('/passengers', function () {
    return Inertia::dialog('passengers.test')->with([
        'passengers' => [1, 2, 3],
    ])->baseRoute('index');
});

When visiting /passengers manually (non-Inertia request), I have hundreds of a "Session store not set on request." exception triggering because I use the session in my HandleInertiaRequests middleware:

EDIT: the "hundreds of" is because I had a custom exception handler using Inertia. Removing it solved the issue.

 'notifications' => fn (Request $request) => [
      'success' => $request->session()->get('success'),
      // ...
  ],

If I remove that piece of code, I have a single exception in the base Inertia controller:

image


So I think there are two issues there:

  • The request don't use my web middleware (I think?) since the session isn't started
  • Using Route::inertia doesn't work with how the modal rendering logic is implemented

I can't set up a reproduction right now (don't have enough time), I think the second issue is easy to reproduce, not sure about the first though.

Old base component shown when navigating to route with modal

I'm having a weird issue when navigating (using Inertia.get) to an URL with a Modal - the modal is displayed properly, but the base component is the one I navigated away from instead of the one defined as baseRoute for the modal.

How can that be?

No, I really don't think it is an axios version problem, I only have one :-)

 npm list axios
code@ /Users/rico/smartcode/projects/smartprax/aarepraxis/code
โ”œโ”€โ”ฌ @inertiajs/[email protected]
โ”‚ โ””โ”€โ”€ [email protected] deduped
โ””โ”€โ”€ [email protected]

How to show Modal from another Modal

Hi,

I need to show a Modal from within a Modal. I have an existing form in Modal-A and it has a button to open up another Modal-B. Once the user has submitted Modal-B form, i need to redirect back to Modal-A.

Is this possible right?

Cannot read properties of null (reading 'props')

I was working with laravel 10 dev, but now that it was released, updated and now when compiling with npm run dev with vite, it shows me this message Cannot read properties of null (reading 'props')
error
debug

vite v4.1.1
laravel v10.0.0 plugin v0.7.4

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.