@@ -35,6 +35,7 @@ export default Component.extend(InboundActions, EmberJstreeActions, {
3535 typesOptions : null ,
3636 searchOptions : null ,
3737 dndOptions : null ,
38+ sort : null ,
3839
3940 selectionDidChange : null ,
4041 treeObject : null ,
@@ -149,6 +150,11 @@ export default Component.extend(InboundActions, EmberJstreeActions, {
149150 configObject [ "search" ] = searchOptions ;
150151 }
151152
153+ let sort = this . get ( "sort" ) ;
154+ if ( isPresent ( sort ) && pluginsArray . includes ( "sort" ) ) {
155+ configObject [ "sort" ] = sort ;
156+ }
157+
152158 let stateOptions = this . get ( "stateOptions" ) ;
153159 if ( isPresent ( stateOptions ) && pluginsArray . includes ( "state" ) ) {
154160 configObject [ "state" ] = stateOptions ;
@@ -456,23 +462,23 @@ export default Component.extend(InboundActions, EmberJstreeActions, {
456462 } ) ;
457463
458464 let pluginsArray = this . get ( "plugins" ) ;
459-
460- if ( isPresent ( pluginsArray ) && pluginsArray . indexOf ( "search" ) > - 1 ) {
461- /*
462- Event: search.jstree
463- Action: eventDidSearch
464- triggered when a search action is performed
465- */
466- treeObject . on ( "search.jstree" , ( event , data ) => {
467- next ( this , function ( ) {
468- if ( this . get ( "isDestroyed" ) || this . get ( "isDestroying" ) ) {
469- return ;
470- }
471- this . callAction ( "eventDidSearch" , event , data ) ;
472- } ) ;
465+
466+ if ( isPresent ( pluginsArray ) && pluginsArray . indexOf ( "search" ) > - 1 ) {
467+ /*
468+ Event: search.jstree
469+ Action: eventDidSearch
470+ triggered when a search action is performed
471+ */
472+ treeObject . on ( "search.jstree" , ( event , data ) => {
473+ next ( this , function ( ) {
474+ if ( this . get ( "isDestroyed" ) || this . get ( "isDestroying" ) ) {
475+ return ;
476+ }
477+ this . callAction ( "eventDidSearch" , event , data ) ;
473478 } ) ;
479+ } ) ;
474480 }
475-
481+
476482 if ( isPresent ( pluginsArray ) && pluginsArray . indexOf ( "checkbox" ) > - 1 ) {
477483 /*
478484 Event: disable_checkbox.jstree
0 commit comments