ef4 / ember-elsewhere

Render elsewhere in the DOM, with nice composition, animation, etc. Based on 100% public API.
MIT License
184 stars 25 forks source link

Feature - allow to customize ordering of components when `multiple-from-elsewhere` is used #42

Closed cjsheu closed 4 years ago

cjsheu commented 4 years ago

Provide a way to customize ordering of components when multiple-form-elsewhere is used.

{{multiple-from-elsewhere name="actions"}}
...
{{#if foo}}
  {{to-elsewhere named="actions" send=(component "test-button" text="Button1") order=1}}
{{/if}}
{{#if bar}}
  {{to-elsewhere named="actions" send=(component "test-button" text="Button2") order=2}}
{{/if}}
{{#if flip}}
  {{to-elsewhere named="actions" send=(component "test-button" text="Button3") order=3}}
{{/if}}

Regardless of which component gets rendered first, it will always honour the specified order.

Button1
Button2
Button3
ef4 commented 4 years ago

Nice work, thanks.