You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Over the next few versions I think it would great to expand the API methods available, allowing certain settings to be changed at run time, rather than needing to recreate the component. The below are ideas for the modal, any other ideas please just comment!
toggle() - Toggles the visibility of the message
title(new_title: string) - Changes the title of the message
body(new_body: string) - Changes the body of the message
isVisible(): boolean - Returns true if the alert is visible, false otherwise
buttons(config: array) - Sets the button configuration, replacing the existing one with the one. Returns the current configuration if no parameters are provided
closable(new_state: boolean) - Sets the closable flag on the modal. Will return the current value if no parameters are provided
load(url: string, stripScripts: boolean) - Will reload the contents of the modal via AJAX using the given URL. stripScripts will default to true, setting to false will allow script tags in the rendered HTML.
trigger(event_name: string) - This will trigger the provided event on the alert instance. Note: This wouldn't be restricted to documented events, so could be used for handling custom events
Options
Addition of a new bodyUrlAllowScripts flag that will default to false but will mimic the behaviour of the load method's second parameter.
Deprecations
Deprecate the current onClose and onOpen properties in favour of using the on method.
The text was updated successfully, but these errors were encountered:
Over the next few versions I think it would great to expand the API methods available, allowing certain settings to be changed at run time, rather than needing to recreate the component. The below are ideas for the modal, any other ideas please just comment!
toggle()
- Toggles the visibility of the messagetitle(new_title: string)
- Changes the title of the messagebody(new_body: string)
- Changes the body of the messageisVisible(): boolean
- Returns true if the alert is visible, false otherwisebuttons(config: array)
- Sets the button configuration, replacing the existing one with the one. Returns the current configuration if no parameters are providedclosable(new_state: boolean)
- Sets the closable flag on the modal. Will return the current value if no parameters are providedload(url: string, stripScripts: boolean)
- Will reload the contents of the modal via AJAX using the given URL.stripScripts
will default to true, setting to false will allow script tags in the rendered HTML.trigger(event_name: string)
- This will trigger the provided event on the alert instance. Note: This wouldn't be restricted to documented events, so could be used for handling custom eventsOptions
Addition of a new
bodyUrlAllowScripts
flag that will default to false but will mimic the behaviour of the load method's second parameter.Deprecations
Deprecate the current
onClose
andonOpen
properties in favour of using theon
method.The text was updated successfully, but these errors were encountered: