jeudi 17 mars 2016

Build Ember Power-Select component

Wondering if Ember power-select can be used as follows.

I have a model that has related records. I'm trying to use PS to pick from one of that list in order to set another related record. To explain more fully, here is the final end state. (This is for a singing competition, models Capitalized):

  • each Contestant sings multiple Songs
  • each Song has one Chart
  • each Contestant submits multiple Submissions (in advance) for pre-clearance
  • each Submission has one Chart

i'm trying to use power-select to pick the Chart for each Song, from the pre-cleared Submission list specific to each contestant.

I can get parts of things working, but can't get the whole thing together because (i think) i'm trying to line up Submissions and Charts, which are related but different items.

so, on a page that represents a Contestant model, i'm trying to do:

{{power-select options=model.submissions onchange=(action pseudo-code: save selected submission.chart to model.chart.)}}

I know this is a difficult question for the format, but i'm hopelessly stuck




Aucun commentaire:

Enregistrer un commentaire