Skip to content

Commit 43edc78

Browse files
authored
[Maps] pass getFieldFormatter to DynamicTextProperty (#53937) (#53965)
* [Maps] pass getFieldFormatter to DynamicTextProperty * remove files from another PR
1 parent 350739b commit 43edc78

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

x-pack/legacy/plugins/maps/public/layers/styles/vector/vector_style.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,13 @@ export class VectorStyle extends AbstractStyle {
613613
return new StaticTextProperty(descriptor.options, VECTOR_STYLES.LABEL_TEXT);
614614
} else if (descriptor.type === DynamicStyleProperty.type) {
615615
const field = this._makeField(descriptor.options.field);
616-
return new DynamicTextProperty(descriptor.options, VECTOR_STYLES.LABEL_TEXT, field);
616+
return new DynamicTextProperty(
617+
descriptor.options,
618+
VECTOR_STYLES.LABEL_TEXT,
619+
field,
620+
this._getFieldMeta,
621+
this._getFieldFormatter
622+
);
617623
} else {
618624
throw new Error(`${descriptor} not implemented`);
619625
}

x-pack/legacy/plugins/maps/public/layers/util/can_skip_fetch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,5 +168,5 @@ export function canSkipFormattersUpdate({ prevDataRequest, nextMeta }) {
168168
return false;
169169
}
170170

171-
return !_.isEqual(prevMeta.fieldNames, nextMeta.fieldNames);
171+
return _.isEqual(prevMeta.fieldNames, nextMeta.fieldNames);
172172
}

0 commit comments

Comments
 (0)