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

fix(module:select): fix select disable cursor #3287

Merged
merged 1 commit into from
Apr 17, 2019
Merged

fix(module:select): fix select disable cursor #3287

merged 1 commit into from
Apr 17, 2019

Conversation

vthinkxie
Copy link
Member

close #3246

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[ ] No

Other information

close #<ng-template #inputTemplate>
  <input #inputElement
    autocomplete="something-new"
    class="ant-select-search__field"
    (compositionstart)="isComposing = true"
    (compositionend)="isComposing = false"
    (input)="updateWidth()"
    [ngModel]="inputValue"
    (ngModelChange)="setInputValue($event)"
    [disabled]="nzSelectService.disabled">
</ng-template>
<div class="ant-select-selection__rendered">
  <div *ngIf="nzPlaceHolder"
    nz-select-unselectable
    [style.display]="placeHolderDisplay"
    class="ant-select-selection__placeholder">{{ nzPlaceHolder }}</div>
  <!--single mode-->
  <ng-container *ngIf="nzSelectService.isSingleMode">
    <!--selected label-->
    <div *ngIf="nzSelectService.listOfCachedSelectedOption.length && nzSelectService.listOfSelectedValue.length"
      class="ant-select-selection-selected-value"
      [attr.title]="nzSelectService.listOfCachedSelectedOption[0]?.nzLabel"
      [ngStyle]="selectedValueStyle">
      {{ nzSelectService.listOfCachedSelectedOption[0]?.nzLabel }}
    </div>
    <!--show search-->
    <div *ngIf="nzShowSearch"
      class="ant-select-search ant-select-search--inline" [style.display]="nzOpen ? 'block' : 'none'">
      <div class="ant-select-search__field__wrap">
        <ng-template [ngTemplateOutlet]="inputTemplate"></ng-template>
        <span class="ant-select-search__field__mirror">{{inputValue}}&nbsp;</span>
      </div>
    </div>
  </ng-container>
  <!--multiple or tags mode-->
  <ul *ngIf="nzSelectService.isMultipleOrTags">
    <ng-container *ngFor="let option of nzSelectService.listOfCachedSelectedOption | slice: 0 : nzMaxTagCount;trackBy:trackValue;">
      <li [@ZoomMotion]
          [nzNoAnimation]="noAnimation?.nzNoAnimation"
          [attr.title]="option.nzLabel"
          [class.ant-select-selection__choice__disabled]="option.nzDisabled"
          class="ant-select-selection__choice">
        <div class="ant-select-selection__choice__content">{{ option.nzLabel }}</div>
        <span *ngIf="!option.nzDisabled"
          class="ant-select-selection__choice__remove"
          (mousedown)="$event.preventDefault()"
          (click)="removeSelectedValue(option, $event)">
          <i nz-icon type="close" class="ant-select-remove-icon" *ngIf="!nzRemoveIcon; else nzRemoveIcon"></i>
        </span>
      </li>
    </ng-container>
    <li *ngIf="nzSelectService.listOfCachedSelectedOption.length > nzMaxTagCount"
        [@ZoomMotion]
        [nzNoAnimation]="noAnimation?.nzNoAnimation"
        class="ant-select-selection__choice">
      <div class="ant-select-selection__choice__content">
        <ng-container *ngIf="nzMaxTagPlaceholder">
          <ng-template
            [ngTemplateOutlet]="nzMaxTagPlaceholder"
            [ngTemplateOutletContext]="{ $implicit: nzSelectService.listOfSelectedValue | slice: nzMaxTagCount}">
          </ng-template>
        </ng-container>
        <ng-container *ngIf="!nzMaxTagPlaceholder">
          + {{ nzSelectService.listOfCachedSelectedOption.length - nzMaxTagCount }} ...
        </ng-container>
      </div>
    </li>
    <li class="ant-select-search ant-select-search--inline">
      <ng-template [ngTemplateOutlet]="inputTemplate"></ng-template>
    </li>
  </ul>
</div>
<span *ngIf="nzAllowClear && nzSelectService.listOfSelectedValue.length"
  class="ant-select-selection__clear"
  nz-select-unselectable
  (mousedown)="$event.preventDefault()"
  (click)="onClearSelection($event)">
    <i nz-icon type="close-circle" theme="fill" *ngIf="!nzClearIcon; else nzClearIcon" class="ant-select-close-icon"></i>
  </span>
<span class="ant-select-arrow" nz-select-unselectable *ngIf="nzShowArrow">
  <i nz-icon type="loading" *ngIf="nzLoading; else defaultArrow"></i>
  <ng-template #defaultArrow>
    <i nz-icon type="down" class="ant-select-arrow-icon" *ngIf="!nzSuffixIcon; else nzSuffixIcon"></i>
  </ng-template>
</span>
@codecov
Copy link

codecov bot commented Apr 17, 2019

Codecov Report

Merging #3287 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3287   +/-   ##
=======================================
  Coverage   97.38%   97.38%           
=======================================
  Files         559      559           
  Lines       11650    11650           
  Branches      837      837           
=======================================
  Hits        11345    11345           
  Misses        194      194           
  Partials      111      111

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c8b923...d2e0164. Read the comment docs.

@netlify
Copy link

netlify bot commented Apr 17, 2019

Deploy preview for ng-zorro-master ready!

Built with commit d2e0164

https://deploy-preview-3287--ng-zorro-master.netlify.com

@vthinkxie vthinkxie merged commit f5528d9 into NG-ZORRO:master Apr 17, 2019
andrew-yangy pushed a commit to andrew-yangy/ng-zorro-antd that referenced this pull request Jun 20, 2019
Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this pull request Apr 9, 2020
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this pull request Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

select 开启服务端搜索后,设置 nzDisabled 鼠标样式错误
1 participant