Virtualization in JavaScript File Manager component
18 Nov 20181 minute to read
The File Manager control’s UI virtualization allows for the dynamic loading of a large number of directories and files in both the details view and large icons view without degrading performance.
Module injection
To use UI virtualization, you must import the Virtualization module from the ej2-filemanager package and inject it using the FileManager.Inject() function.
import { FileManager, Virtualization } from '@syncfusion/ej2-filemanager';
FileManager.Inject(Virtualization);Enable virtualization
Virtualization behavior depends on the viewport size (height/width). Enable it by setting the enableVirtualization property to true. Virtualization applies to both Large Icons and Details views where supported.
In the example below, a sizable collection of files can be found in the folders Documents and Text Documents.
Limitations for Virtualization
- Programmatic selection using the
selectAllmethod is not supported with virtual scrolling. - The keyboard shortcut CTRL+A will only select the files and directories that are currently visible within the viewport, rather than selecting all files and directories in the entire directory tree.
- Selected file items are not maintained while scrolling, considering the performance of the control.