Skip to content
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

Modals allow any type of property #693

Closed
blessedbythestorm opened this issue Dec 15, 2022 · 3 comments · Fixed by #716
Closed

Modals allow any type of property #693

blessedbythestorm opened this issue Dec 15, 2022 · 3 comments · Fixed by #716
Labels
feature request Request a feature or introduce and update to the project. ready to test Ready to be tested for quality assurance.

Comments

@blessedbythestorm
Copy link

blessedbythestorm commented Dec 15, 2022

Describe what feature you'd like. Pseudo-code, mockups, or screenshots of similar solutions are encouraged!

I want to be able to pass any property to a modal component that has exported properties.

At the moment I have to stringify data and I'm unable to pass functions into the component.

Currently:

const detailsModal: ModalComponent = {
        ref: modal,
        props: {
            data: JSON.stringify(inData),
        },
        slot: '<p>Skeleton</p>'
    };

Expected:

const detailsModal: ModalComponent = {
        ref: modal,
        props: {
            data: inData,
            callback: inFunction,
        },
        slot: '<p>Skeleton</p>'
    };

Maybe there is a different way to do this?

What type of pull request would this be?

Enhancement

Any links to similar examples or other references we should review?

No response

@blessedbythestorm blessedbythestorm added the feature request Request a feature or introduce and update to the project. label Dec 15, 2022
@endigo9740
Copy link
Contributor

endigo9740 commented Dec 15, 2022

Any particular reason you stringify your prop data? That's not a requirement or suggestion we put in place. I suppose an additional way to pass data like Drawers would be useful in some scenarios though, so I think we can add something like that. See the meta key for Drawers to see what I mean.

I'd also recommend viewing this ticket where we have some expansions planned for the modal system:

I'll cross reference this here as the work will probably be handled for all of these at the same time.

@endigo9740
Copy link
Contributor

Here's the updated documentation for this feature. This be available in the next release.

Screen Shot 2022-12-16 at 4 28 27 PM

@endigo9740 endigo9740 added the ready to test Ready to be tested for quality assurance. label Dec 16, 2022
@endigo9740
Copy link
Contributor

The PR is available here to test and provide feedback

Preview URL:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request a feature or introduce and update to the project. ready to test Ready to be tested for quality assurance.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants