-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamically remove an element #7
Comments
@JamesJinnn Just to be sure:
|
@dennisameling it does re-order the grid and fix the gap automatically after i resize your browser screen.
|
I believe removing an item has changed slightly in murri >= v0.9.0. As it now expects an array: Was playing around and found something that helped me: When the item is destroyed:
Then find this item and remove it from the grid:
Demo with removing here: https://www.flingo.co.za/muuri/dashboard1 Code with directive here: https://github.com/ubergeoff/flingo/blob/master/libs/muuri/src/lib/directives/tile-grid.directive.ts |
Thanks @ubergeoff for catching this. There is an even easier way to create the @JamesJinnn can you try the new <button id="add-item-button" (click)="addToGrid()">+ Add new block</button>
<br><br>
<div #grid class="grid" muuriGrid [config]="layoutConfig">
<div class="grid-item" muuriGridItem *ngFor="let item of blockItems">
<div class="grid-item-content">
{{ item }}
</div>
</div>
</div> If you now remove an item from the Please let me know if that fixes the issue for you, so we can go ahead and close this issue 😊 |
When i try add an element it works great. Unfortunately, when i try to remove an element. it's didn't dynamically removed. it's leave a space over there.
The text was updated successfully, but these errors were encountered: