RevealBi / Reveal.Sdk

Issue tracker - Reveal SDK https://www.revealbi.io/
https://www.revealbi.io/
3 stars 0 forks source link

[BUG]: Dashboard filters use "FieldName" rather than "FieldLabel" #203

Open exscalliber opened 1 month ago

exscalliber commented 1 month ago

SDK Version

1.6.6

Client Framework

HTML/JavaScript

Server Platform

Node.js

Operating System

Mac

Description

Hi, I have been playing with the "onFieldsInitializing" event on the revealView on the client SDK and have found that it does not affect the filters. A good example is when you add a dashboard scoped "Dashboard Filter". If you change the labels of the fields, it will not be reflected in the filter and will instead show the "FieldName" instead of the "FieldLabel" (im referencing the getSchema endpoint return values).

To change the field names im doing this in the revealView:

revealView.onFieldsInitializing = function (args) {
  args.fields.forEach(field => {
    if (field.name === 'ABC') {
      field.label = 'Pretty Name'
    } else if (...
  });
}

This changes the field names in the edit visualization screen perfectly but does not change filters.

luispandolfi commented 1 month ago

Thanks @exscalliber for reporting. We already created an internal issue to track it AB#30885 We'll keep you updated here.