ember-modal-dialog icon indicating copy to clipboard operation
ember-modal-dialog copied to clipboard

Exception: cannot update computed class names

Open tsteuwer opened this issue 7 years ago • 3 comments

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}}

tsteuwer avatar Jul 12 '17 19:07 tsteuwer

Any updates on this?

jibrankalia-sf avatar Apr 09 '19 21:04 jibrankalia-sf

No updates as yet. Needs someone to dig in and figure out what's going wrong and how to fix it.

lukemelia avatar Apr 09 '19 21:04 lukemelia

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);
});

frederikbosch avatar Feb 11 '22 14:02 frederikbosch