Paging issues
Device settings does not return next page so get top 500 Found a rare issue where Settings Catalog could return next page after all items were returned. This caused the app to crash when scrolling the list.
This commit is contained in:
@@ -856,6 +856,7 @@ function Invoke-InitializeModule
|
|||||||
Id = "DeviceCategories"
|
Id = "DeviceCategories"
|
||||||
ViewID = "IntuneGraphAPI"
|
ViewID = "IntuneGraphAPI"
|
||||||
API = "/deviceManagement/deviceCategories"
|
API = "/deviceManagement/deviceCategories"
|
||||||
|
QUERYLIST = "`$top=500"
|
||||||
Permissons = @("DeviceManagementConfiguration.ReadWrite.All")
|
Permissons = @("DeviceManagementConfiguration.ReadWrite.All")
|
||||||
GroupId = "DeviceConfiguration"
|
GroupId = "DeviceConfiguration"
|
||||||
})
|
})
|
||||||
@@ -1038,7 +1039,7 @@ function Set-EMViewPanel
|
|||||||
$global:btnLoadAllPages.add_click({
|
$global:btnLoadAllPages.add_click({
|
||||||
Write-Status "Loading $($global:curObjectType.Title) objects"
|
Write-Status "Loading $($global:curObjectType.Title) objects"
|
||||||
[array]$graphObjects = Get-GraphObjects -property $global:curObjectType.ViewProperties -objectType $global:curObjectType -AllPages
|
[array]$graphObjects = Get-GraphObjects -property $global:curObjectType.ViewProperties -objectType $global:curObjectType -AllPages
|
||||||
$graphObjects | ForEach-Object { $global:dgObjects.ItemsSource.AddNewItem($_) | Out-Null }
|
$graphObjects | Where-Object { $_ -ne $null } | ForEach-Object { $global:dgObjects.ItemsSource.AddNewItem($_) | Out-Null }
|
||||||
$global:dgObjects.ItemsSource.CommitNew()
|
$global:dgObjects.ItemsSource.CommitNew()
|
||||||
Set-GraphPagesButtonStatus
|
Set-GraphPagesButtonStatus
|
||||||
Invoke-FilterBoxChanged $global:txtFilter -ForceUpdate
|
Invoke-FilterBoxChanged $global:txtFilter -ForceUpdate
|
||||||
@@ -1048,7 +1049,7 @@ function Set-EMViewPanel
|
|||||||
$global:btnLoadNextPage.add_click({
|
$global:btnLoadNextPage.add_click({
|
||||||
Write-Status "Loading $($global:curObjectType.Title) objects"
|
Write-Status "Loading $($global:curObjectType.Title) objects"
|
||||||
[array]$graphObjects = Get-GraphObjects -property $global:curObjectType.ViewProperties -objectType $global:curObjectType -SinglePage
|
[array]$graphObjects = Get-GraphObjects -property $global:curObjectType.ViewProperties -objectType $global:curObjectType -SinglePage
|
||||||
$graphObjects | ForEach-Object { $global:dgObjects.ItemsSource.AddNewItem($_) | Out-Null }
|
$graphObjects | Where-Object { $_ -ne $null } | ForEach-Object { $global:dgObjects.ItemsSource.AddNewItem($_) | Out-Null }
|
||||||
$global:dgObjects.ItemsSource.CommitNew()
|
$global:dgObjects.ItemsSource.CommitNew()
|
||||||
Set-GraphPagesButtonStatus
|
Set-GraphPagesButtonStatus
|
||||||
Invoke-FilterBoxChanged $global:txtFilter
|
Invoke-FilterBoxChanged $global:txtFilter
|
||||||
|
|||||||
Reference in New Issue
Block a user