cancel
Showing results for 
Search instead for 
Did you mean: 

set Caption at Tabs MDK

horiii
Explorer
0 Kudos
375

Hello,

I try to setCaption of Tabs Control but it's now working. I keep have this error:

TypeError: Cannot read properties of undefined (reading 'title')
I attached a rule to the item of Tabs Control and a rule to the caption of item.Have you any idea?Thanks

View Entire Topic
bill_froelich
Product and Topic Expert
Product and Topic Expert

To set the caption via a rule just return the string you want to display

export default function setCaptionRule(clientAPI) {
    // Do some stuff in the rule
    let myCaption = 'XYZ';
    let otherValue = '123';

    // Return the caption as a String
    return `${myCaption}-${otherValue}`;
}