File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -286,6 +286,7 @@ class MainContainerController extends ComponentController {
286286 activeIndex = me . getTabIndex ( value ) ,
287287 tabContainer = me . getReference ( 'tab-container' ) ,
288288 activeView = me . getView ( activeIndex ) ,
289+ switchView = tabContainer . activeIndex !== activeIndex ,
289290 id ;
290291
291292 // console.log('onHashChange', value);
@@ -300,16 +301,18 @@ class MainContainerController extends ComponentController {
300301 }
301302
302303 if ( value . country ) {
303- if ( activeView . ntype === 'table-container' ) {
304- id = activeView . selectionModel . getRowId ( activeView . store . indexOf ( value . country ) ) ;
305- activeView . selectionModel . select ( id ) ;
306-
307- Neo . main . DomAccess . scrollIntoView ( {
308- id : id
309- } ) ;
310- } else {
311- activeView . selectionModel . select ( value . country ) ;
312- }
304+ setTimeout ( ( ) => {
305+ if ( activeView . ntype === 'table-container' ) {
306+ id = activeView . selectionModel . getRowId ( activeView . store . indexOf ( value . country ) ) ;
307+ activeView . selectionModel . select ( id ) ;
308+
309+ Neo . main . DomAccess . scrollIntoView ( {
310+ id : id
311+ } ) ;
312+ } else {
313+ activeView . selectionModel . select ( value . country ) ;
314+ }
315+ } , switchView ? 100 : 0 ) ;
313316 }
314317 }
315318
Original file line number Diff line number Diff line change @@ -128,6 +128,10 @@ class Main extends core.Base {
128128 let hashObj = DomEvents . parseHash ( window . location . hash . substr ( 1 ) ) ,
129129 hashArr = [ ] ;
130130
131+ if ( typeof data === 'string' ) {
132+ data = DomEvents . parseHash ( data ) ;
133+ }
134+
131135 Object . assign ( hashObj , data ) ;
132136
133137 Object . entries ( hashObj ) . forEach ( ( [ key , value ] ) => {
Original file line number Diff line number Diff line change @@ -275,9 +275,15 @@ class Button extends Component {
275275 * @private
276276 */
277277 changeRoute ( ) {
278- Neo . Main [ this . editRoute ? 'editRoute' : 'setRoute' ] ( {
279- value : this . route
280- } ) ;
278+ const me = this ;
279+
280+ if ( me . editRoute ) {
281+ Neo . Main . editRoute ( this . route ) ;
282+ } else {
283+ Neo . Main . setRoute ( {
284+ value : me . route
285+ } ) ;
286+ }
281287 }
282288}
283289
You can’t perform that action at this time.
0 commit comments