表的计数器返回负值

问题描述

我的数据网格显示了我的服务的数据,但现在 ID 列包含负数

服务

  ListarPaginaPersonas = ( filters: any) => {
    const params = ConvertObjectToGetParams({
      ...filters
    });
    return this.http.get <IServerResponse < any[]>>(
      `${this.url}/getpersonas`,{ params   }); };

html

<div *ngIf="showme">
        <lib-grid [loading]="state.loading"
                  [deFinition]="state.gridPersona.deFinition"
                  controlName="IdPersona2"
                  [formGroup]="form"
                  [source]="state.gridPersona.source.items">
        </lib-grid>
      </div>

ngOnInit

  ngOnInit(): void {
    this.buildForm();    
    this.store.dispatch(new ContainerActions.ListarPaginaPersona(null));
  }

动作

  export class ListarPaginaPersona {
    static readonly type = '[FORM-ACTIVIDAD-SOL-CONTAINER] ListarPaginaPersona';
    constructor(public payload: { nrodocId:any}) { }
  }

状态

listarPaginaPersonasBegin = (
    ctx: StateContext<FormActividadContainerModel>   ) => {
    const state = ctx.getState();
    ctx.patchState({
      gridPersona: {
        ...state.gridPersona,loading: true},});}      listarPaginaPersonasSuccess = (
    ctx: StateContext<FormActividadContainerModel>   ) => (items: any[]) => {
    const state = ctx.getState();
    ctx.patchState({
      gridPersona: {
        ...state.gridPersona,loading: false,source: {
          ...state.gridPersona.source,items,pageSize: items.length,total: items.length,} },});}       listarPaginaPersonasError = (
    ctx: StateContext<FormActividadContainerModel>   ) => (error) => {
    const state = ctx.getState();
    ctx.patchState({
      gridPersona: {...state.gridPersona,loading: false},});}       @Action(ContainerActions.ListarPaginaPersona)   asyncListarPaginaPersonas(
    ctx: StateContext<FormActividadContainerModel>,{ payload }: ContainerActions.ListarPaginaPersona   ) {
    this.listarPaginaPersonasBegin(ctx);    
    return this.personaService.ListarPaginaPersonas(payload).pipe(
      tap(response => {
         this.listarPaginaPersonasSuccess(ctx)(response.data || [] );}),catchError(err => {
        this.listarPaginaPersonasError(ctx)(err);
        return throwError(err);}));}

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)