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

Select single conditional styling

Accepted answer
29
Views
2
Comments
edited Mar 5, 2021 4:02AM in Visual Builder 2 comments

Summary

Make certain values bold based on other field values on the same record

Content

I have a select single that I would like to display certain values in bold.  I can easily make all the values bold using a span and stype property as below:

<template slot="itemTemplate">
  <span style = "font-weight:bold;"><oj-bind-text value="[[ $current.data.name ]]"></oj-bind-text></span>
</template>

I am also able to make certain values blue based on other criteria on the same record like default_template and editable as below:

<span :style.color="[[ $current.data.default_template == 1 && $current.data.editable == 1 ? 'blue' : 'black' ]]"><oj-bind-text value="[[ $current.data.name ]]"></oj-bind-text>

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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