'Division' field name and picklist items missing#1093
Conversation
50eab0d to
9719750
Compare
3548273 to
7a10bb9
Compare
| value: division.get('id'), | ||
| title: division.get('name') | ||
| })); | ||
| this.divisionsPromise = undefined; |
There was a problem hiding this comment.
Don't do this! One of the main features of promises is that invoking then on an already resolved promise will invoke the continuation immediately so you don't have to keep track of the state manually!
There was a problem hiding this comment.
Oh wow, why didn't I know about this sooner!
I always though that this code is invalid:
const a = Promise.resolve();
a.then(console.log);
a.then(console.log); // Error?There was a problem hiding this comment.
| return $('<option>').attr('value', item.value).text(item.title)[0]; | ||
| }); | ||
| this.$el.empty().append(options).prop('disabled', options.length < 1); | ||
| this.$el.val(this.resource.get('fieldname')); |
There was a problem hiding this comment.
'fieldname'? How is that supposed to work?
|
@grantfitzsimmons, would you please test this with a database that has more than one division? Make sure that the division can be set, saved, reloaded with the correct value appearing, and then changed to a new value, saved and reloaded. |
grantfitzsimmons
left a comment
There was a problem hiding this comment.
The data entry forms no longer work on this branch!
After testing this with multiple divisions, the division can be set, saved, reloaded multiple times and preserve its original value. This issue appears to be solved.
Seems like cell may have `labelfor` or it might have an `id`. Need to check box to detect if the label belongs to a division picklist
|
The data entry forms not working is a separate issue that has been fixed on another branch. |



Fixes #735