-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
Open
Description
Prerequisites
- I have searched for duplicate or closed feature requests
- I have read the contributing guidelines
Proposal
My proposal is to reevaluate the passed options to the Modal constructor when show() is called.
A perfect working example of this is how Tooltip handles certain properties, like placement or title.
{
"placement": () => this.placement,
"title": () => this.title
}I'd like to see similar behaviour for the modal, like so:
{
"backdrop": () => this.shouldShowBackdrop,
"focus": () => this.shouldFocus,
"keyboard": () => this.allowKeyboard,
}Motivation and context
We're creating a modal using its constructor early in the runtime of the application. Then at later points in time, we pass dynamic content to the modal and then call show. The only problem with this approach is that we can't change any of the configuration initially passed into the constructor, like keyboard, once the modal instance was created.
jsaldanaperez, LuukLeijtens and alexis-aquanty