We'd love to hear from you! Provide  feedback  to earn a badge today. Take our quick survey
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to select checkbox based on boolean

Received Response
17
Views
3
Comments
edited Oct 19, 2020 6:14PM in Visual Builder 3 comments

Summary

I have an array that is returning true in a Boolean field, how can i make this field reflect a checked box?

Content

Hello Guys,

isSelectedOrder: true

I have this field 'isSelectedOrder' inside of an Array that is marked as true... this field is equal an checkbox inside of one table.... how can I mark this checkbox when this value comes as true from my array?

I'm attaching how the table should be returned on the example (nowdays it does not mark the checkbox)

  1.  
  2.  

Code Snippet

Table code:

<oj-table scroll-policy="loadMoreOnScroll" data="[[ $variables.omniorderPickupOrdersADP ]]" columns='[{"headerText":"Check","template":"cellTemplate","field":"isSelectedOrder"},{"headerText":"Display Code","field":"displayCode"},{"headerText":"Data","field":"dtImplantacao"},{"headerText":"Num Items","field":"numItems"}]' class="oj-flex-item oj-sm-12 oj-md-5" selection-mode.row="multiple" style="width: 100%;height:300px;">
    <template slot="cellTemplate">
      <oj-ext-checkbox-switch value="{{ $current.row.isSelectedOrder }}" on-click="[[$listeners.ojExtCheckboxSwitchClick]]"></oj-ext-checkbox-switch>
    </template>    
  </oj-table>

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!