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
Copy file name to clipboardExpand all lines: README.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -270,6 +270,14 @@ By default, the modal will close when you click outside the modal. If you want t
270
270
}
271
271
```
272
272
273
+
By default, when a child modal is closed, the closed components state is still available if the same modal component is opened again. If you would like to destroy the component when its closed you can override the static `destroyOnClose` method and have it return `true`. When a destroyed modal is opened again its state will be reset.
274
+
```php
275
+
public static function destroyOnClose(): bool
276
+
{
277
+
return true;
278
+
}
279
+
```
280
+
273
281
## Skipping previous modals
274
282
In some cases you might want to skip previous modals. For example:
275
283
1. Team overview modal
@@ -314,6 +322,12 @@ class DeleteTeam extends ModalComponent
314
322
}
315
323
```
316
324
325
+
You can also optionally call the `destroySkippedModals()` method to destroy the skipped modals so if any are opened again their state will be reset
326
+
327
+
328
+
329
+
330
+
317
331
## Building Tailwind CSS for production
318
332
To purge the classes used by the package, add the following lines to your purge array in `tailwind.config.js`:
0 commit comments