# file-manager-custom-sorting

> File manager that applies a natural sort comparer so numbered folders sort in numeric order.

**Framework:** vue  **Component:** FileManager  **Variant:** custom-sorting

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/vue/file-manager-custom-sorting.json
```

**Install Package(s)**

```bash
npm install @syncfusion/ej2-vue-filemanager
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/file-manager-custom-sorting/FileManager.vue

```vue
<template>
  <div class="control-section file-custom-sorting">
    <div class="sample-container">
      <ejs-filemanager
        id="file-manager"
        :ajaxSettings="ajaxSettings"
        :sortComparer="sortComparer"
        :detailsViewSettings="detailsViewSettings"
      />
    </div>
  </div>
</template>

<script lang="ts">
import { FileManagerComponent, DetailsView, NavigationPane, Toolbar, sortComparer } from '@syncfusion/ej2-vue-filemanager';

export default {
  components: {
    'ejs-filemanager': FileManagerComponent
  },
  data() {
    return {
      ajaxSettings: {
        url: 'https://physical-service.syncfusion.com/api/NaturalSorting/FileOperations',
        getImageUrl: 'https://physical-service.syncfusion.com/api/NaturalSorting/GetImage',
        uploadUrl: 'https://physical-service.syncfusion.com/api/NaturalSorting/Upload',
        downloadUrl: 'https://physical-service.syncfusion.com/api/NaturalSorting/Download'
      },
      sortComparer: sortComparer,
      detailsViewSettings: {
        columns: [
          { field: 'name', headerText: 'File Name', minWidth: 120, width: 'auto', customAttributes: { class: 'e-fe-grid-name' }, template: '${name}', sortComparer: sortComparer },
          { field: 'size', headerText: 'File Size', minWidth: 50, width: '110', template: '${size}' },
          { field: '_fm_modified', headerText: 'Date Modified', minWidth: 50, width: '190' }
        ]
      }
    };
  },
  provide() {
    return {
      filemanager: [DetailsView, NavigationPane, Toolbar]
    };
  }
};
</script>

<style scoped>
.file-custom-sorting .sample-container {
  margin: 10px 10px 10px 10px;
}
</style>

```
