SmartClient Version: v13.1p_2025-03-12/AllModules Development Only (built 2025-03-12)
Safari, Chrome, Firefox on MacOS
Hello, I've just managed to replicate a problem that I noticed in my application. It happens in an AdaptiveMenu which has an embeddedComponent as the last item, and some items have a visibleWhen which evaluates to false. Please try this test case in the showcase:
You'll see that the embeddedComponent isn't in the last position; instead, the second-to-last item is:

You'll also see a couple WARN in the console:
Safari, Chrome, Firefox on MacOS
Hello, I've just managed to replicate a problem that I noticed in my application. It happens in an AdaptiveMenu which has an embeddedComponent as the last item, and some items have a visibleWhen which evaluates to false. Please try this test case in the showcase:
Code:
isc.DynamicForm.create({
ID: "exampleForm",
width: "100%",
fields: [
{
name: "username",
title: "Username",
type: "text",
width: "*",
required: true,
defaultValue: "bob"
},
{
name: "email",
title: "Email",
required: true,
width: "*",
type: "text",
defaultValue: "bob@isomorphic.com"
}
]
});
isc.AdaptiveMenu.create({
ID: "adaptiveMenu",
menuButtonTitle: "More...",
align: "center",
defaultLayoutAlign: "center",
items: [
{
title: "Foo Bar",
icon: "Edit"
},
{
title: "Foo Bar",
icon: "Edit"
},
{
title: "Foo Bar",
icon: "Edit"
},
{
title: "Foo Bar Bar",
icon: "Edit"
},
{
title: "Foo Bar",
icon: "Cancel",
visibleWhen: {fieldName: "exampleForm.values.username", operator: "notEqual", value: "bob"}
},
{
title: "Foo Bar Bar",
icon: "Cancel",
visibleWhen: {fieldName: "exampleForm.values.username", operator: "notEqual", value: "bob"}
},
{
title: "second-last",
icon: "Close",
visibleWhen: {fieldName: "exampleForm.values.username", operator: "equals", value: "bob"}
},
{
title: "Edit",
showRollOver: false,
embeddedComponent: isc.HStack.create({
snapTo: "TR",
height: "100%",
width: 190,
membersMargin: 3,
layoutMarginBottom: 5,
defaultLayoutAlign: "center",
members: [
isc.IButton.create({title: "Cut", autoFit:true, click: "isc.say(this.title)"}),
isc.IButton.create({title: "Copy", autoFit:true, click: "isc.say(this.title)"}),
isc.IButton.create({title: "Paste", autoFit:true, click: "isc.say(this.title)"})
]
}),
embeddedComponentFields: ["key"]
}
]
});
isc.ToolStrip.create({
ID: "toolStrip",
height: 40,
width: "100%",
layoutMargin: 0,
defaultLayoutAlign: "center",
members: [adaptiveMenu]
});
isc.Window.create({
ID: "testWindow",
title: isc.version,
maximized: true,
showFooter: true,
items: [exampleForm],
footerControls: [toolStrip]
}).show()
You'll also see a couple WARN in the console:
Code:
*21:34:21.216:TMR7:WARN:FilteredList:isc_FilteredList_7 (dataSource: isc_DataSource_4, created by: undefined):Invalid observation: Target is not an object. target: null, methodName: dataChanged, action: 'observer.dataSourceDataChanged(dsRequest,dsResponse)'
Comment