Make value table LWC component dynamic

design-attributesdynamicjavascripttable

I have the following syntax where I want to replace 'Accounts_List' with a design value :

 @wire(getDynamicTableDataList, { TableName: 'Accounts_List'})
    wiredContacts({ error, data }) 
    {
        console.log(this.objectListApiName);

The log returns the correct value.
I tried { TableName:'{objectListApiName}'} but this gives an error.

How do I replace the hardcoded 'Accounts_List' with an @api value

Best Answer

Reactive properties for wire methods use a simple $ prefix:

{ TableName:'$objectListApiName'}

You can read more in the documentation.