Issue with "OptionList"

In the OptionList, Each item is displaying in a single row, instead of that can we display it in multiple rows. if the item is long, it will be ending with 3 dots so we can’t see whole item.

Here is the Code:

result = CloudCode.callTask(task, params);

    var batch = new LocalDB.Batch();

    var locationOptions = {}, sitesArr = [], locationsArr = [];

    for (var i = 0; i < result.addressList.AddressSearchResults.AddressSearchResultsArray.length; i++) {

        var site = result.addressList.AddressSearchResults.AddressSearchResultsArray[i];

        var newSite = LocalDB.site.create();

        newSite.customer = site.companyName;

        newSite.country = site.countryCode;

        newSite.city = site.cityName;

        newSite.state_province = site.state;

        newSite.idn = site.addressID;  

        newSite.ship_to = site.billing_type_code;

        var address_site = '';

        if (site.addressLine1) {

            address_site = site.addressLine1;

        }

        if (site.addressLine2) {

            address_site = address_site + ', ' + site.addressLine2;

        }

        if (site.addressLine3) {

           address_site = address_site + ', ' + site.addressLine3;

        }

        if (site.addressLine4) {

            address_site = address_site + ', ' + site.addressLine4;

        }

        newSite.address = address_site;

        newSite.postal_code = site.postalCode;

        locationsArr.push(newSite.customer + ': ' + newSite.address + ', '+ newSite.city + ', ' + newSite.postal_code + ', ' + newSite.country);

        batch.save(newSite);

        locationOptions[i] = newSite;

        sitesArr.push(newSite);

    }

    batch.execute();

    view.found_sites = sitesArr;

    if (locationsArr.length > 0) {

        view.show_tips = false;

        var results = optionList(locationsArr);

        if (results > -1) {

            view.selected_site = locationOptions[results];

            filterCustomers();

        }

    } else {

        dialog(t('t.no_customers_found'), t('t.please_refer_to_the_search_tips_and_ensure_that_your_search_criteria_as_been_entered_correctly'));

        view.show_tips = true;

    }

Please refer the screenshot:

Please assist me.

Thanks in Advance.

Hi

What container and runtime version are you using?

Hi Tileman,

Container and Runtime version: 4.83.2(22.2.1)

Current application version: 2.14.9

App: Site safety app

Branch: users/shweta/testing-api

Testing deployment: soumya-dev-deployment

Thanks,

Shweta B Pujar

@ShwethaPujar Ok, so the word wrapping for the optionList component was only added/fixed in runtime version 4.84 (which at time of writing is currently in Release Candidate)

So you can consider using the release candidate runtime version, or wait for it to get promoted to the stable channel.

Here is what the list looks like using RC 4.84.0:

1 Like