function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Luis Aguiar 18Luis Aguiar 18 

lightning:path

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?
Dushyant SonwarDushyant Sonwar

Try this

<aura:component implements="forceCommunity:availableForAllPageTypes,flexipage:availableForAllPageTypes,force:hasRecordId" >
    <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"/>
    <aura:html tag="style">
    
    .slds-path__mark-complete , .slds-path__mark-complete:hover {
        background-color: red;
        border-color : white;
    }
	</aura:html>
    <lightning:path aura:id="pathCustom" recordId="{!v.recordId}"
        variant="{!v.variant}"
        hideUpdateButton="{!v.hideUpdateButton}"
       	onselect="{!c.handleSelect}"
    />
</aura:component>
Hope this helps!