1
0
Fork 0
liza/src/dapi
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
..
format Add ResponseApply 2017-08-10 09:52:07 -04:00
http SpoofedNodeHttpImpl: Fix docblocks (User{Session=>Request}) 2018-05-01 09:44:55 -04:00
AutoRetry.js LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
BucketDataApi.js LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
DataApi.js DataApi: Update docblock and strict mode 2017-08-10 09:52:07 -04:00
DataApiFactory.js [BC BREAK] DataApi config lookup 2017-08-29 15:11:28 -04:00
DataApiManager.js dapi: Fix *_label setting 2018-12-17 13:32:00 -05:00
GetRestDataApiStrategy.js LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
MissingDataError.js [DEV-3257] DataApiMediator: Auto-expand into fields on reply [*] 2018-07-17 15:44:37 -04:00
PostRestDataApiStrategy.js LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
QuoteDataApi.js QuoteDataApi: Correct constructor argument error 2018-05-01 09:44:55 -04:00
RestDataApi.js LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
RestDataApiStrategy.js LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
RestrictedDataApi.js RestrictedDataApi#request: Make virtual 2017-08-10 09:52:07 -04:00
StaticAdditionDataApi.js dapi: Do not perform static additions in invalid response data 2018-01-15 11:03:46 -05:00