1
0
Fork 0
liza/test
Mike Gerwitz 6b3ab89e77 dapi: Fix *_label setting
The `*_label' fields were not being properly set because they were being
considered just as every other expanded field, which is subject to other
considerations to ensure that we do not overwrite user data.  Label fields,
on the other hand, _must_ always be set whenever the value changes, and are
_not_ modifiable by the user.

This codifies that `_label' assumption that I would like removed in the
future, but time does not permit that sort of refactoring right
now.  Ideally, labels would be treated generically like any other expanded
field and have an attribute set of them that would change their expansion
behavior.

* src/client/dapi/DataApiMediator.js (_updateFieldData): Pass label field id
    to `_populateWithMap'.
  (_populateWithMap): Use it to always populate the label field when the key
    matches, ignoring the other expansion criteria that would inhibit it.
* test/client/dapi/DataApiMediatorTest.js: Update test accordingly.
* src/dapi/DataApiManager.js (triggerFieldUpdate): Provide id to
    `_genUiFieldData'.
  (_genUiFieldData)[label_id]: New field.  Return it as part of the return
    object's `label_id' field.

DEV-4077
2018-12-17 13:32:00 -05:00
..
bucket [DEV-3257] DelayedStagingBucket: Preempt infinite recursion on #processValues 2018-08-10 11:17:13 -04:00
client dapi: Fix *_label setting 2018-12-17 13:32:00 -05:00
conf Add ConfLoader 2017-08-28 09:07:28 -04:00
dapi Add HttpDataApiUrlData 2018-05-01 09:44:53 -04:00
document [DEV-2871] DocumentProgramFormatter: Match on fields from FieldClassMatcher instead of __classes and program.whens 2018-06-13 15:42:45 -04:00
event ValueSetEventHandler: New handler for `set' event 2018-02-07 14:59:50 -05:00
field FieldClassMatcher: Minor refactoring/cleanup 2018-06-12 16:52:14 -04:00
program Accommodate ancient qtype data on init and clean 2018-11-19 11:10:16 -05:00
quote [DEV-3393] Made sure the entity id is a number 2018-08-16 07:35:52 -04:00
server Accommodate ancient qtype data on init and clean 2018-11-19 11:10:16 -05:00
store Add DelimitedKey Store trait 2017-08-29 14:34:40 -04:00
system LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
ui GeneralStepUiTest: Fix failing test case in newer version of Node 2018-03-07 14:12:48 -05:00
validate LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
pre.js LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00