Semantic-ui: Destroying elements (removing event listeners etc to prevent memory leaks in SPA)

Created on 29 Jan 2016  路  2Comments  路  Source: Semantic-Org/Semantic-UI

Hi.

I am using SUI with Ember JS and each SUI element is being implemented as an Ember component. However, in Ember we are creating single page applications and as a result we need to teardown jQuery-based elements once they are ready to be removed from the DOM to prevent memory leaks.

Does anyone know how this can be done in SUI? I've found a reference to "modules" and a "destroy" function/setting but I can't get these to work.

Any help that anyone could offer would be appreciated.

Thanks.

Usage Question

Most helpful comment

All javascript components have a destroy method

$('.ui.dropdown').dropdown('destroy')

We also have dedicated ember components.
https://github.com/Semantic-Org/Semantic-UI-Ember

All 2 comments

All javascript components have a destroy method

$('.ui.dropdown').dropdown('destroy')

We also have dedicated ember components.
https://github.com/Semantic-Org/Semantic-UI-Ember

Thanks for your help.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

miguelmota picture miguelmota  路  3Comments

larsbo picture larsbo  路  3Comments

Morrolan picture Morrolan  路  3Comments

ghost picture ghost  路  3Comments

deneuxa picture deneuxa  路  3Comments