开发者

Toggle viewstack within child component

I have a viewstack with two tabs.

In one of them there is a data grid shows a list of notes. The other one is includes a form that can edit notes or crates new note. I want the user to be able to add new note开发者_如何转开发 or edit existing note when clicks an item in data grid. I mean when user clicks an item the viewstack must become editor.


You can use the "selectedIndex" or "selectedItem" property on the viewstack to switch the active view. In your case, an event should be dispatched that bubbles up to the component containing the viewstack. When it arrives, the viewstack's active view can then be changed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜