Salesforce Fact #597 | Reusable LWC for string manipulating methods

Many times we have requirement to have input text as uppercase or lowercase to be set automatically. We can create a reusable LWC component which would have all these functions and we would pass the text value as input to those functions.

In this example, we have two inputs in the LWC component where the first input should be lowercase and second input should be uppercase set automatically. We have created a reusable LWC component having the two public methods and calling them from the onchange handlers.

The reusable component can further be modified to have additional string functions as per the requirement.

Attached are the screenshots.





Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow