• Luis Aguiar 18
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

Hello all. I've created a custom component to show the Case status path. And it is working as expected. But now they want to change the color of the "Mark current status" button. So far the documentation i found only applies if i use standart HTML to build it from scratch, and not if i use <lightning:path \>. Or i could hack the DOM redered by salesforce, and force CSS in there, but  i believe i run the risk of in an API change, of that not working (Don't i?) My code:

Component

<aura:component implements="forceCommunity:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" controller="CST_pathComponent">
    <aura:attribute name="variant" type="String" default="linear"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <aura:attribute name="hideUpdateButton" type="Boolean" default="false"/>
    <lightning:path aura:id="path" recordId="{!v.recordId}"
        variant="{!v.variant}"
        hideUpdateButton="{!v.hideUpdateButton}"
       	onselect="{!c.handleSelect}"
    />
</aura:component>

JS

({
    doInit: function (component, event) {
        var action = component.get("c.getUserInfo");
        action.setCallback(this, function (response) {
            
            var state = response.getState();
            console.log('response: ' + response);
            console.log('state: ' + state);
            console.log('CST_pathComponent response 1:  ' + response.getReturnValue());
            if (state === 'SUCCESS') {
                var hideBtn = response.getReturnValue();
«                component.set('v.hideUpdateButton', hideBtn);
            }
        });
        
        $A.enqueueAction(action);
	},
    handleSelect: function(component, event){
        console.log('select');
    }
})
Any ideas?