Fix Pager component issue which manifested itself in Event Log. This reverts a fix from #1160 and addresses the root problem.
This commit is contained in:
		@ -12,8 +12,8 @@ else
 | 
			
		||||
    <table class="table table-borderless">
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label>@Localizer["Level:"] </label>
 | 
			
		||||
                <select class="form-control" @onchange="(e => LevelChanged(e))">
 | 
			
		||||
                <Label For="level" HelpText="Select the log level for event log items" ResourceKey="Level">Level: </Label><br /><br />
 | 
			
		||||
                <select id="level" class="form-control" @onchange="(e => LevelChanged(e))">
 | 
			
		||||
                    <option value="-"><@Localizer["All Levels"]></option>
 | 
			
		||||
                    <option value="Trace">@Localizer["Trace"]</option>
 | 
			
		||||
                    <option value="Debug">@Localizer["Debug"]</option>
 | 
			
		||||
@ -24,8 +24,8 @@ else
 | 
			
		||||
                </select>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label>@Localizer["Function:"] </label>
 | 
			
		||||
                <select class="form-control" @onchange="(e => FunctionChanged(e))">
 | 
			
		||||
                <Label For="function" HelpText="Select the function for event log items" ResourceKey="Function">Function: </Label><br /><br />
 | 
			
		||||
                <select id="function" class="form-control" @onchange="(e => FunctionChanged(e))">
 | 
			
		||||
                    <option value="-"><@Localizer["All Functions"]></option>
 | 
			
		||||
                    <option value="Create">@Localizer["Create"]</option>
 | 
			
		||||
                    <option value="Read">@Localizer["Read"]</option>
 | 
			
		||||
@ -36,8 +36,8 @@ else
 | 
			
		||||
                </select>
 | 
			
		||||
            </td>
 | 
			
		||||
            <td>
 | 
			
		||||
                <label>@Localizer["Maximum Records:"] </label>
 | 
			
		||||
                <select class="form-control" @onchange="(e => RowsChanged(e))">
 | 
			
		||||
                <Label For="rows" HelpText="Select the maximum number of event log items to review. Please note that if you choose more than 10 items the information will be split into pages." ResourceKey="Rows">Maximum Items: </Label><br /><br />
 | 
			
		||||
                <select id="rows" class="form-control" @onchange="(e => RowsChanged(e))">
 | 
			
		||||
                    <option value="10">10</option>
 | 
			
		||||
                    <option value="50">50</option>
 | 
			
		||||
                    <option value="100">100</option>
 | 
			
		||||
@ -48,7 +48,7 @@ else
 | 
			
		||||
 | 
			
		||||
    @if (_logs.Any())
 | 
			
		||||
    {
 | 
			
		||||
        <Pager TableItem="Log" Items="@_logs">
 | 
			
		||||
        <Pager Items="@_logs">
 | 
			
		||||
            <Header>
 | 
			
		||||
                <th style="width: 1px;"> </th>
 | 
			
		||||
                <th>@Localizer["Date"]</th>
 | 
			
		||||
@ -141,10 +141,6 @@ else
 | 
			
		||||
    private async Task GetLogs()
 | 
			
		||||
    {
 | 
			
		||||
        _logs = await LogService.GetLogsAsync(PageState.Site.SiteId, ((_level == "-") ? string.Empty : _level), ((_function == "-") ? string.Empty : _function), int.Parse(_rows));
 | 
			
		||||
        await InvokeAsync(() =>
 | 
			
		||||
        {
 | 
			
		||||
            base.StateHasChanged();
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private string GetClass(string function)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user