angular-gridster2
angular-gridster2 copied to clipboard
gridster-preview element display does not change if add element via store and rendering items with async pipe
- Render gridster-items with
asyncpipe - Add item to store
- Delete item from store
Result gridster-item is removed, gridster-preview element still visible
Same issue here , any ideas?
I think it´s related to #317
This works for me:
this.store.dispatch(new RemoveWidget(data.params.tab.idWidget));
/// Try to fix Gridster Bug
setTimeout(() => {
let el = this.elRef.nativeElement.getElementsByTagName(
'gridster-preview'
);
this.render.setStyle(el[0], 'display', '');
}, 50);
Same issue here. What are you attaching your ViewChild to?
Thanks
Nevermind, I figured it out. Thanks.
@karloscode Where did you add that workaround? I am trying to fix this issue in my project for several days and finally have some hope to do so.
This works for me:
this.store.dispatch(new RemoveWidget(data.params.tab.idWidget)); /// Try to fix Gridster Bug setTimeout(() => { let el = this.elRef.nativeElement.getElementsByTagName( 'gridster-preview' ); this.render.setStyle(el[0], 'display', ''); }, 50);
Fixed in v20.2.4