Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StackContainer does not update selectedChildWidget properly when all tabs are removed #190

Open
xmedeko opened this issue May 14, 2021 · 0 comments

Comments

@xmedeko
Copy link
Contributor

xmedeko commented May 14, 2021

The recommended way to listen to selected tab change is

myTabContainer.watch("selectedChildWidget", function(name, oval, nval){
    console.log("selected child changed from ", oval, " to ", nval);
});

see https://dojotoolkit.org/reference-guide/1.10/dijit/layout/TabContainer.html#tabcontainer-events

It works for TabContainer.addChild and TabContainer.removeChild, too. However, then TabContainer.removeChild removes the last selected tab, then the watch event is not fired, but the selectedChildWidget is set to undefined, see https://github.com/dojo/dijit/blob/master/layout/StackContainer.js#L204 I would like selectedChildWidget to set properly even when the last tab is removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant