show

makes the component visible

void show( [boolean force,boolean animation] );
forcebooleanwhen set to true, the command will show not only the current view but all the parent views as well (can be used for nested tabviews or nested mutliviews)
animationbooleanenables/disables animation during view showing (details below)

Example

// default
$$("list").show();
// without animation
$$("list").show(false, false);

Details

This method helps showing the views that are hidden with:

  • the hide method;
  • the hidden parameter;
  • Multiview API (if the view is a Multiview cell).

To show a view initially, you can also set the hidden parameter in the view constructor to true.

Performance tip

With standard views (not windows), instead of the hide and show method calls, you can include views into ui.multiview and use its API to manage view visibility.

Animation

The second parameter of show() works only for the views that are included into Multiview. Note that the animate setting of Multiview must not be disabled.

Use Cases

1. A view is shown with the animation, defined for Multiview ("slide" by default)

  • the view doesn't have the animate type of its own,
  • the animation parameter is not set or set to true
cells:[
    { id:"some", /* view config */ }
]
// ...
$$("some").show();
// same as above
$$("some").show(false, true);

2. A view is shown without animation, while animation is enabled or disabled in Multiview

cells:[
    { id:"some", /* view config */ }
]
// ...
$$("some").show(false, false);

Related sample:  Multiview: Showing Cells with and Without animation

3. Animation for a view is different from Multiview animation

  • a view has the animation type of its own (e.g. { type:"flip", subtype:"vertical" })
cells:[
  { id:"some", animate:{ type:"flip", subtype:"vertical" } }
]
// ... with the flip animation
$$("some").show();
 
// ... without animation
$$("some").show(false, false);

Related sample:  Multiview: Redefining Animation Type for Cells

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix ui widget library and page of accordion ui product.