使用树列表时获取选择模型不可用

getselectionmodel when using treelist not available

我正在使用树列表并尝试使用 getselectionmodel但是抛出错误。如果我使用树面板而不是树列表,它会起作用。

this.up('panel').getSelectionModel().getSelection();

https://fiddle.sencha.com/#fiddle/1fpf

树列表是轻量级的 - 它们本身没有选择模型。您可以使用 getSelection() config property accessor.

查看选择