Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

表格穿梭框,无法使用搜索功能 #5641

Closed
007GitHu opened this issue Aug 3, 2020 · 7 comments · Fixed by #6169
Closed

表格穿梭框,无法使用搜索功能 #5641

007GitHu opened this issue Aug 3, 2020 · 7 comments · Fixed by #6169

Comments

@007GitHu
Copy link

007GitHu commented Aug 3, 2020

Reproduction link

https://stackblitz.com/edit/angular-1vgrcr?file=src/app/app.component.ts

Steps to reproduce

使用搜索功能无法正确过滤出值

What is expected?

和8版本一样可以过滤出正确的值

What is actually happening?

实际效果是过滤效果失效

Environment Info
ng-zorro-antd 9.3.0
Browser 谷歌
@zorro-bot
Copy link

zorro-bot bot commented Aug 3, 2020

Translation of this issue:

Table shuttle box, you can not use the search function

Reproduction link

[Https://stackblitz.com/edit/angular-1vgrcr?file=src/app/app.component.ts](https://stackblitz.com/edit/angular-1vgrcr?file=src/app/app. component.ts)

Steps to reproduce

Use the search function can not filter out the correct value

What is expected?

And 8 versions of the same can filter out the correct value

What is actually happening?

The net effect is the effect of filter failure

Environment Info
Ng-zorro-antd 9.3.0
Browser Google

@carolinetanxin
Copy link

Reproduction link

https://stackblitz.com/edit/angular-1vgrcr?file=src/app/app.component.ts

Steps to reproduce

使用搜索功能无法正确过滤出值

What is expected?

和8版本一样可以过滤出正确的值

What is actually happening?

实际效果是过滤效果失效

Environment Info
ng-zorro-antd 9.3.0
Browser 谷歌

现在遇到了同样的问题,请问有任何进展吗?👀 @hsuanxyz @wenqi73 @cipchk @007GitHu

@cipchk
Copy link
Member

cipchk commented Dec 9, 2020

@carolinetanxin 列表是根据 hide 来控制显示的,需要在加一层判断,例如:

            <ng-container *ngFor="let data of t.data">
              <tr *ngIf="!data.hide" (click)="onItemSelect(data)">
                <td [nzChecked]="data.checked" [nzDisabled]="disabled || data.disabled" (nzCheckedChange)="onItemSelect(data)"></td>
                <td>{{ data.title }}</td>
                <td *ngIf="direction === 'left'">
                  <nz-tag>{{ data.tag }}</nz-tag>
                </td>
                <td>{{ data.description }}</td>
              </tr>
            </ng-container>

@carolinetanxin
Copy link

@carolinetanxin 列表是根据 hide 来控制显示的,需要在加一层判断,例如:

            <ng-container *ngFor="let data of t.data">
              <tr *ngIf="!data.hide" (click)="onItemSelect(data)">
                <td [nzChecked]="data.checked" [nzDisabled]="disabled || data.disabled" (nzCheckedChange)="onItemSelect(data)"></td>
                <td>{{ data.title }}</td>
                <td *ngIf="direction === 'left'">
                  <nz-tag>{{ data.tag }}</nz-tag>
                </td>
                <td>{{ data.description }}</td>
              </tr>
            </ng-container>

@cipchk 感谢,但是另外一个问题是,table里关于搜索结果的显示,不在当前页的数据显示不出来。尝试使用table的虚拟滚动,并没有办法解决该问题。

@cipchk
Copy link
Member

cipchk commented Dec 10, 2020

这个问题是传递过来的数据包含着所有数据不管是不是已经符合检索前后,应该是只返回检索过的数据。

@carolinetanxin
Copy link

这个问题是传递过来的数据包含着所有数据不管是不是已经符合检索前后,应该是只返回检索过的数据。

@cipchk 是的,没有只返回检索过的数据。谢谢你的解答,期待修复❤️。我也考虑下有没有什么别的设计方案先避开使用该组件。

@cipchk
Copy link
Member

cipchk commented Dec 11, 2020

临时解决方案,就是做一个 Pipe 然后过滤掉这部分数据。

yangjunhan pushed a commit that referenced this issue Dec 11, 2020
* chore(module:transfer): fix demo

- close #5641

* chore: fix demo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants