Unverified Commit c3689ac0 authored by Rohit Sharma's avatar Rohit Sharma Committed by GitHub
Browse files

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: default avatarXhmikosR <xhmikosr@gmail.com>
parent 03ed3e0b
Showing with 2 additions and 12 deletions
+2 -12
...@@ -37,15 +37,13 @@ const ESCAPE_KEY = 'Escape' ...@@ -37,15 +37,13 @@ const ESCAPE_KEY = 'Escape'
const Default = { const Default = {
backdrop: true, backdrop: true,
keyboard: true, keyboard: true,
focus: true, focus: true
show: true
} }
const DefaultType = { const DefaultType = {
backdrop: '(boolean|string)', backdrop: '(boolean|string)',
keyboard: 'boolean', keyboard: 'boolean',
focus: 'boolean', focus: 'boolean'
show: 'boolean'
} }
const EVENT_HIDE = `hide${EVENT_KEY}` const EVENT_HIDE = `hide${EVENT_KEY}`
...@@ -557,8 +555,6 @@ class Modal extends BaseComponent { ...@@ -557,8 +555,6 @@ class Modal extends BaseComponent {
} }
data[config](relatedTarget) data[config](relatedTarget)
} else if (_config.show) {
data.show(relatedTarget)
} }
}) })
} }
......
...@@ -877,12 +877,6 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap ...@@ -877,12 +877,6 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
<td><code>true</code></td> <td><code>true</code></td>
<td>Puts the focus on the modal when initialized.</td> <td>Puts the focus on the modal when initialized.</td>
</tr> </tr>
<tr>
<td><code>show</code></td>
<td>boolean</td>
<td><code>true</code></td>
<td>Shows the modal when initialized.</td>
</tr>
</tbody> </tbody>
</table> </table>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment