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
Hi! Thanks for super work - so nice to se WebAPIs utilized in this way!
Situation:
I'm working in a webpage, where elements appear and disappear based on state.
Currently intl-number-input only binds events, but it has no destroy/unbind/teardown method, meaning there is no way to do garbage collection/free up memory.
Solution:
Add a .destroy method removing the instance and all listeners. Example API:
const numberInput = new NumberInput({
el: document.querySelector('input'),
options: {
// see API reference
}
})
// set initial value
numberInput.setValue(1234)
// Remove listeners and other references so element can be garbage collected
numberInput.destroy()
The text was updated successfully, but these errors were encountered:
Hi! Thanks for super work - so nice to se WebAPIs utilized in this way!
Situation:
I'm working in a webpage, where elements appear and disappear based on state.
Currently intl-number-input only binds events, but it has no destroy/unbind/teardown method, meaning there is no way to do garbage collection/free up memory.
Solution:
Add a
.destroy
method removing the instance and all listeners. Example API:The text was updated successfully, but these errors were encountered: