]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Remove the `show` property from the modal plugin (#32279)
authorRohit Sharma <rohit2sharma95@gmail.com>
Mon, 30 Nov 2020 10:12:40 +0000 (15:42 +0530)
committerGitHub <noreply@github.com>
Mon, 30 Nov 2020 10:12:40 +0000 (12:12 +0200)
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 <xhmikosr@gmail.com>
js/src/modal.js
site/content/docs/5.0/components/modal.md

index db8345fac195d64f62f5967341b3415553b18a8a..fdca482135f59b8f3b6171ee542815cb29b45b12 100644 (file)
@@ -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)
       }
     })
   }
index 5bd116c8ec55a42a4532da43674a4fd3fd6f94b7..36dc3b5483205e0031a5a959367ae313ef39b303 100644 (file)
@@ -877,12 +877,6 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
       <td><code>true</code></td>
       <td>Puts the focus on the modal when initialized.</td>
     </tr>
-    <tr>
-      <td><code>show</code></td>
-      <td>boolean</td>
-      <td><code>true</code></td>
-      <td>Shows the modal when initialized.</td>
-    </tr>
   </tbody>
 </table>