3
votes
Accepted
Set the color of a value in lwc
You have a few choices. Option 1 is to set the entire style:
<div style={style}>{item}</div>
Which is set in JavaScript:
this.style = `color: ${data.itemColor}`;
Option 2 is to set a CSS ...
1
vote
Accepted
Before After LWC Slider
LWC doesn't work quite the same as vanilla JavaScript. I'd recommend that you attach an event listener directly to the slider, then handle the event.
<input
type="range"
min=&...
1
vote
change color of lighning button in JS not working
Lightning Web Components currently enforces shadow DOM on every component, encapsulating a component’s internal markup and making it inaccessible to CSS, HTML or JS. More about this here: https://...
1
vote
change color of lighning button in JS not working
Like all lightning components, you cannot mess with the styling of the component's internals in this way because their content is protected within a Shadow DOM. You have to use the features provided, ...
1
vote
Accepted
Conditionally disable button in LWC Datatable
disabled: {fieldName: 'PID' == this.projectId.data}
Is incorrect. You need to specify the field:
disabled: { fieldName: 'tacticsDisabled' },
Which you then apply to each row:
this.accList = this....
1
vote
Why can't I get rid of the 'X' button on my LWC Modal? I have a 'Cancel' lightning button so the 'X' is not needed
lightning__RecordAction with actionType set to ScreenAction provides a modal for you. You don't need to use SLDS modal markup when you use this type. See lightning-quick-action-panel for an example of ...
1
vote
Accepted
Lightning web component causing refresh loop
You have your structure wrong, it seems. Your wire doesn't return the data, but rather a response which itself has a data attribute. Renaming would help clarify things, and then you need to figure out ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
html × 928visualforce × 267
lightning-web-components × 265
javascript × 223
apex × 156
css × 154
marketing-cloud × 115
ampscript × 67
email × 65
lightning-aura-components × 63
email-template × 58
lightning × 47
pdf × 35
slds × 27
community × 24
table × 23
jquery × 17
content-builder × 17
html5 × 17
js × 16
controller × 14
visualforce-component × 14
cloudpage × 14
images × 13
lightning-design-system × 12