ember-modal-dialog
ember-modal-dialog copied to clipboard
Exception: cannot update computed class names
Using it the first time works.
Trying to update computed class names results in an exception being thrown:
TypeError: this.get(...).join is not a function
at Class.<anonymous> (modal-dialog.js:17)
at ComputedPropertyPrototype.get (ember.debug.js:19348)
at Object.get (ember.debug.js:24165)
at RootPropertyReference.compute (ember.debug.js:17312)
at RootPropertyReference.value (ember.debug.js:17179)
at ConditionalReference.value (ember.debug.js:1101)
at ConditionalHelperReference.compute (ember.debug.js:12940)
at ConditionalHelperReference.value (ember.debug.js:17179)
at EvaluatedPositionalArgs.value (ember.debug.js:1103)
at concat (ember.debug.js:12522)
Example:
{{#modal-dialog
onClose=(action "closeModal")
translucentOverlay=true
clicksOutsideToClose=true
overlayClassNames="white-bg transparent"
containerClass=someComputedClassName
containerClassNames=someOtherComputedClassNames
}}
<div>
Hi, Modal.
</div>
{{/modal-dialog}}
Any updates on this?
No updates as yet. Needs someone to dig in and figure out what's going wrong and how to fix it.
containerClassNames
is an array.
<ModalDialog @containerClassNames={{pass-array "modal"}}>
import { helper as buildHelper } from '@ember/component/helper';
export default buildHelper(function() {
return Array.prototype.slice.call(arguments, 0, -1);
});