0

I'm new developing LWC but I don't find any information regarding my problem. I need to build a component that can be configured differently in some of the pages, so I would need to have multiple properties with string[] value instead of string. I managed to get the string one working, here is my .xml config:

<targetConfig targets="lightning__FlowScreen">
    <property name="qlikHost" label="Qlik Host" type="String[]" default="qlik.net" required="false"/>
</targetConfig>

From the information I see here: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.reference_configuration_tags this is not supported. But from and older question here I see that for FlowScreen components it used to be supported. The problem is that I need a component that can be inside the App Page.

Can you help me with a workaround for my problem?

Thanks

2
  • Welcome to SSE, from the question I understand you are trying to add the component on an app page and pass some string properties to it. You are going through the correct page, You can use the picklist property and expose to lightning__AppPage Commented Mar 20, 2023 at 12:47
  • I want to configure some string[] for some properties instead of string, is that possible? Commented Mar 20, 2023 at 16:02

1 Answer 1

0

You can add a String property like -

<property label="ToBeFilled" name="name" type="String" default=""/>

You can add string values separated by commas. In LWC create an API variable-

@api ToBeFilled;

// In connectedCallBack 
connectedCallBack(){
   //create an array by splitting the values by comma
   let ToBeFilledArray = ToBeFilled.split(',');
   console.log('ToBeFilledArray ',ToBeFilledArray);
}

Feel free to ask for any clarifications.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .