Open Closed

Iterative search using File Manager #5854


User avatar
0
rwright-ruhealth created
  • ABP Framework version: v7.3.2
  • UI Type: / MVC / RAzor
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): tiered multi-solution mvc/razor
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Would like the search to search all items in the File Manager instead of searching only the selected tree. Your help is appreciated. using source code version of File Manager and ABP Suite commercial. Thank you.


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Because you have the source code, you can modify the source code directly.

    For exmaple, add a method to IFileDescriptorRepository to get all items by filter:

        public virtual async Task<List<FileDescriptor>> GetAllListAsync(
            string filter = null,
            string sorting = null,
            int maxResultCount = int.MaxValue,
            int skipCount = 0,
            CancellationToken cancellationToken = default)
        {
            return await (await GetDbSetAsync())
                .WhereIf(!string.IsNullOrWhiteSpace(filter), x => x.Name.Contains(filter))
                .OrderBy(sorting.IsNullOrWhiteSpace() ? FileDescriptorConsts.DefaultSorting : sorting)
                .PageBy(skipCount, maxResultCount)
                .ToListAsync(GetCancellationToken(cancellationToken));
        }
    

    And use it in the appservice.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11