Skip to content

Commit

Permalink
[Maps] pass getFieldFormatter to DynamicTextProperty (elastic#53937)
Browse files Browse the repository at this point in the history
* [Maps] pass getFieldFormatter to DynamicTextProperty

* remove files from another PR
  • Loading branch information
nreese committed Jan 3, 2020
1 parent 851f37d commit 2855c43
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,13 @@ export class VectorStyle extends AbstractStyle {
return new StaticTextProperty(descriptor.options, VECTOR_STYLES.LABEL_TEXT);
} else if (descriptor.type === DynamicStyleProperty.type) {
const field = this._makeField(descriptor.options.field);
return new DynamicTextProperty(descriptor.options, VECTOR_STYLES.LABEL_TEXT, field);
return new DynamicTextProperty(
descriptor.options,
VECTOR_STYLES.LABEL_TEXT,
field,
this._getFieldMeta,
this._getFieldFormatter
);
} else {
throw new Error(`${descriptor} not implemented`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,5 @@ export function canSkipFormattersUpdate({ prevDataRequest, nextMeta }) {
return false;
}

return !_.isEqual(prevMeta.fieldNames, nextMeta.fieldNames);
return _.isEqual(prevMeta.fieldNames, nextMeta.fieldNames);
}

0 comments on commit 2855c43

Please sign in to comment.