From: Rohit Sharma Date: Mon, 30 Nov 2020 10:12:40 +0000 (+0530) Subject: Remove the `show` property from the modal plugin (#32279) X-Git-Tag: v5.0.0-beta1~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3689ac07335c1c76a9d16efc5363ed32ea6c1f3;p=thirdparty%2Fbootstrap.git Remove the `show` property from the modal plugin (#32279) Drop the support of show property from the modal plugin. When creating the new modal instance in v5, the `show` property does not work anymore, so instead of fixing the behavior just removing it permanently to keep the consistency between all the plugins. (All other plugins require the `show()` method to be called on the instances to be shown) Co-authored-by: XhmikosR --- diff --git a/js/src/modal.js b/js/src/modal.js index db8345fac1..fdca482135 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -37,15 +37,13 @@ const ESCAPE_KEY = 'Escape' const Default = { backdrop: true, keyboard: true, - focus: true, - show: true + focus: true } const DefaultType = { backdrop: '(boolean|string)', keyboard: 'boolean', - focus: 'boolean', - show: 'boolean' + focus: 'boolean' } const EVENT_HIDE = `hide${EVENT_KEY}` @@ -557,8 +555,6 @@ class Modal extends BaseComponent { } data[config](relatedTarget) - } else if (_config.show) { - data.show(relatedTarget) } }) } diff --git a/site/content/docs/5.0/components/modal.md b/site/content/docs/5.0/components/modal.md index 5bd116c8ec..36dc3b5483 100644 --- a/site/content/docs/5.0/components/modal.md +++ b/site/content/docs/5.0/components/modal.md @@ -877,12 +877,6 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap true Puts the focus on the modal when initialized. - - show - boolean - true - Shows the modal when initialized. -