Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    FieldPicker questions about 14.0

    Hi there, we are upgrading from 12.1 to 14.0 and having a few issues getting the FieldPicker configuration right.

    First, sample values are not showing for us even though fieldPickerShowSampleValues is set to true. I tried this in your Showcase sample and wasn't able to get it to display there either by adding the same property to the grid: https://smartclient.com/smartclient-...id=fieldPicker

    Second, in 12.1 we were able to override isc.FieldPicker.getPrototype().emptyTitleHint to display a value (ie. "[Search Fields]" in the filterEditor at the top of the Available Fields grid. It gives the user a little context on using that field to filter values but it no longer works in 14.0. How can we put a text hint in the filter editor at the top with 14.0?

    Third, we have a grid with a lot of titles that are long and we insert line breaks when formatting the titles in the grid headers. But, we want remove those line breaks when displaying the field picker for cleaner formatting and making search work better. We had a patch for 12.1 overriding isc.FieldPicker.getPrototype().createDataSourceFromFields to do this in 12. 1 but we can't get it working yet with 14.0. Is there a recommended way to make this change in 14.0?

    #2
    hi Dave,

    The first two issues were regressions related to new features in those areas, and both have been fixed for tomorrow's builds, dated May 16 or later. Note that it's cleaner to use isc.FieldPicker.addProperties().

    For the third point, you were hacking an internal API here - you can do it with public APIs with code like we show below - if that isn't clean enough for you, we could add a more direct approach as a tiny Feature Sponsorship, if that appeals to you.

    Code:
    isc.FieldPicker.changeDefaults("availableFieldsGridDefaults", {
        getCellValue : function (record, recordNum, fieldNum) {
            var result = this.Super("getCellValue", arguments);
            // title field
            if (fieldNum == 0) result = result.replaceAll("<br>", " ");
            return result;
        }
    });
    Last edited by Isomorphic; 15 May 2025, 01:49.

    Comment


      #3
      thank you looks great!

      Comment

      Working...
      X