Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/primefaces/primeng
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Mar 29, 2024
2 parents 468e20e + 86f23b8 commit 44564e2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
5 changes: 3 additions & 2 deletions src/app/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ export class DropdownItem {
<input
#filter
type="text"
role="searchbox"
autocomplete="off"
[value]="_filterValue() || ''"
class="p-dropdown-filter p-inputtext p-component"
Expand Down Expand Up @@ -290,13 +291,13 @@ export class DropdownItem {
></p-dropdownItem>
</ng-container>
</ng-template>
<li *ngIf="filterValue && isEmpty()" class="p-dropdown-empty-message" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="presentation">
<li *ngIf="filterValue && isEmpty()" class="p-dropdown-empty-message" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
<ng-container *ngIf="!emptyFilterTemplate && !emptyTemplate; else emptyFilter">
{{ emptyFilterMessageLabel }}
</ng-container>
<ng-container #emptyFilter *ngTemplateOutlet="emptyFilterTemplate || emptyTemplate"></ng-container>
</li>
<li *ngIf="!filterValue && isEmpty()" class="p-dropdown-empty-message" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="presentation">
<li *ngIf="!filterValue && isEmpty()" class="p-dropdown-empty-message" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
<ng-container *ngIf="!emptyTemplate; else empty">
{{ emptyMessageLabel }}
</ng-container>
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/fileupload/fileupload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ export class FileUpload implements AfterViewInit, AfterContentInit, OnInit, OnDe
// this will check the fileLimit with the uploaded files
this.checkFileLimit(files);

if (this.hasFiles() && this.auto && !(this.mode === 'advanced') && !this.isFileLimitExceeded()) {
if (this.hasFiles() && this.auto && (!(this.mode === 'advanced') || !this.isFileLimitExceeded())) {
this.upload();
}

Expand Down
17 changes: 11 additions & 6 deletions src/app/components/multiselect/multiselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const MULTISELECT_VALUE_ACCESSOR: any = {
template: `
<li
pRipple
role='option'
role="option"
[ngStyle]="{ height: itemSize + 'px' }"
class="p-multiselect-item"
[ngClass]="{ 'p-multiselect-item': true, 'p-highlight': selected, 'p-disabled': disabled, 'p-focus': focused }"
Expand Down Expand Up @@ -217,7 +217,6 @@ export class MultiSelectItem {
<span
#firstHiddenFocusableEl
role="presentation"
[attr.aria-hidden]="'true'"
class="p-hidden-accessible p-hidden-focusable"
[attr.tabindex]="0"
(focus)="onFirstHiddenFocus($event)"
Expand Down Expand Up @@ -251,7 +250,13 @@ export class MultiSelectItem {
[attr.aria-label]="toggleAllAriaLabel"
/>
</div>
<div class="p-checkbox-box" role="checkbox" [attr.aria-label]="toggleAllAriaLabel" [attr.aria-checked]="allSelected()" [ngClass]="{ 'p-highlight': allSelected(), 'p-focus': headerCheckboxFocus, 'p-disabled': disabled || toggleAllDisabled }">
<div
class="p-checkbox-box"
role="checkbox"
[attr.aria-label]="toggleAllAriaLabel"
[attr.aria-checked]="allSelected()"
[ngClass]="{ 'p-highlight': allSelected(), 'p-focus': headerCheckboxFocus, 'p-disabled': disabled || toggleAllDisabled }"
>
<ng-container *ngIf="allSelected()">
<CheckIcon [styleClass]="'p-checkbox-icon'" *ngIf="!checkIconTemplate" [attr.aria-hidden]="true" />
<span *ngIf="checkIconTemplate" class="p-checkbox-icon" [attr.aria-hidden]="true">
Expand All @@ -264,6 +269,7 @@ export class MultiSelectItem {
<input
#filterInput
type="text"
role="searchbox"
[attr.autocomplete]="autocomplete"
[attr.placeholder]="filterPlaceHolder"
role="searchbox"
Expand Down Expand Up @@ -347,13 +353,13 @@ export class MultiSelectItem {
</ng-container>
</ng-template>
<li *ngIf="hasFilter() && isEmpty()" class="p-multiselect-empty-message" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }">
<li *ngIf="hasFilter() && isEmpty()" class="p-multiselect-empty-message" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
<ng-container *ngIf="!emptyFilterTemplate && !emptyTemplate; else emptyFilter">
{{ emptyFilterMessageLabel }}
</ng-container>
<ng-container #emptyFilter *ngTemplateOutlet="emptyFilterTemplate || emptyTemplate"></ng-container>
</li>
<li *ngIf="!hasFilter() && isEmpty()" class="p-multiselect-empty-message" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }">
<li *ngIf="!hasFilter() && isEmpty()" class="p-multiselect-empty-message" [ngStyle]="{ height: scrollerOptions.itemSize + 'px' }" role="option">
<ng-container *ngIf="!emptyTemplate; else empty">
{{ emptyMessageLabel }}
</ng-container>
Expand All @@ -370,7 +376,6 @@ export class MultiSelectItem {
<span
#lastHiddenFocusableEl
role="presentation"
[attr.aria-hidden]="true"
class="p-hidden-accessible p-hidden-focusable"
[attr.tabindex]="0"
(focus)="onLastHiddenFocus($event)"
Expand Down

0 comments on commit 44564e2

Please sign in to comment.