Following code works perfectly before winter 24 org,
Component:
<aura: component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<aura:attribute name="showpassword" type="Boolean" default="false"/>
<div class="slds-form-element__control slds-input-has-icon slds-input-has-icon--right">
<lightning:input variant="label-hidden"
type="{!v.showpassword ? 'text':'password'}"
value="myPasswordText" />
<lightning:buttonIcon class="slds-button slds-input__icon"
iconName="{!v.showpassword ? 'utility:hide':'utility:preview'}"
alternativeText="{!v.showpassword ? 'Hide':'Show'}"
onclick="{!c.togglePassword}" />
</div>
</aura: component>
Controller:
({
// show or hide password
togglePassword: function (component) {
const oldValue = component.get('v.showpassword');
//if true set false/vise-versa
component.set('v.showpassword', !oldValue);
},
})
Expected: (Working before WI-24)
Issue: (Click on show/hide button you wont see the difference) (After WI-24)