Skip to content

Commit

Permalink
fix(module:autocomplete): remove inline style (CSP compliant) (#8875)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturovt authored Nov 18, 2024
1 parent 23eab98 commit 30c25f0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/auto-complete/autocomplete.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ function normalizeDataSource(value: AutocompleteDataSource): AutocompleteDataSou
(@slideMotion.done)="onAnimationEvent($event)"
[@.disabled]="!!noAnimation?.nzNoAnimation"
>
<div style="max-height: 256px; overflow-y: auto; overflow-anchor: none;">
<div style="display: flex; flex-direction: column;">
<div class="ant-select-dropdown-content-wrapper">
<div class="ant-select-dropdown-content">
<ng-template *ngTemplateOutlet="nzDataSource ? optionsTemplate : contentTemplate"></ng-template>
</div>
</div>
Expand Down
11 changes: 11 additions & 0 deletions components/auto-complete/style/patch.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
.ant-select-dropdown-hidden {
display: none;
}

.ant-select-dropdown-content-wrapper {
max-height: 256px;
overflow-y: auto;
overflow-anchor: none;
}

.ant-select-dropdown-content {
display: flex;
flex-direction: column;
}

0 comments on commit 30c25f0

Please sign in to comment.