Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
truenas-rk3588
webui
Commits
651a73e3
Commit
651a73e3
authored
3 years ago
by
Rehan Yousaf
Browse files
Options
Download
Email Patches
Plain Diff
NAS-112767: Fixed loading
parent
bab61c8e
NAS-112767-mocks
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/app/pages/account/groups/group-form/group-form.component.html
+1
-0
...pages/account/groups/group-form/group-form.component.html
src/app/pages/common/ix-forms/components/ix-combobox2/ix-combobox2.component.html
+3
-3
...forms/components/ix-combobox2/ix-combobox2.component.html
src/app/pages/common/ix-forms/components/ix-combobox2/ix-combobox2.component.scss
+2
-1
...forms/components/ix-combobox2/ix-combobox2.component.scss
src/app/pages/common/ix-forms/components/ix-combobox2/ix-combobox2.component.ts
+12
-8
...x-forms/components/ix-combobox2/ix-combobox2.component.ts
with
18 additions
and
12 deletions
+18
-12
src/app/pages/account/groups/group-form/group-form.component.html
View file @
651a73e3
...
...
@@ -35,6 +35,7 @@
[label]=
"'User Combobox'"
formControlName=
"userCombo"
[provider]=
"userProvider"
[tooltip]=
"'This is the tooltip'"
></ix-combobox2>
<ix-combobox2
[label]=
"'Normal Combobox'"
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/common/ix-forms/components/ix-combobox2/ix-combobox2.component.html
View file @
651a73e3
...
...
@@ -6,7 +6,6 @@
<span
*ngIf=
"required"
>
*
</span>
</label>
<tooltip
*ngIf=
"tooltip"
[header]=
"label"
class=
"tooltip"
[message]=
"tooltip"
></tooltip>
<mat-progress-spinner
*ngIf=
"loading"
class=
"loader"
mode=
"indeterminate"
[diameter]=
"15"
></mat-progress-spinner>
</div>
...
...
@@ -21,8 +20,9 @@
(blur)=
"onTouch()"
[matAutocomplete]=
"auto"
>
<span
*ngIf=
"shouldShowResetInput()"
class=
"reset-input"
>
<mat-icon
(click)=
"resetInput()"
role=
"img"
fontSet=
"mdi-set"
fontIcon=
"mdi-close-circle"
></mat-icon>
<span
*ngIf=
"shouldShowResetInput() || loading"
class=
"reset-input"
>
<mat-progress-spinner
*ngIf=
"loading"
class=
"loader"
mode=
"indeterminate"
[diameter]=
"15"
></mat-progress-spinner>
<mat-icon
(click)=
"resetInput()"
*ngIf=
"shouldShowResetInput()"
role=
"img"
fontSet=
"mdi-set"
fontIcon=
"mdi-close-circle"
></mat-icon>
</span>
<mat-autocomplete
#auto
="
matAutocomplete
"
[displayWith]=
"getDisplayWith"
(optionSelected)=
"optionSelected($event.option.value)"
(opened)=
"onOpenDropdown()"
>
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/common/ix-forms/components/ix-combobox2/ix-combobox2.component.scss
View file @
651a73e3
...
...
@@ -42,7 +42,7 @@
.loader
{
display
:
inline-block
;
margin-left
:
8
px
;
margin-left
:
4
px
;
}
.label-container
{
...
...
@@ -74,6 +74,7 @@
.input-container
mat-icon
{
font-size
:
1rem
;
height
:
auto
;
margin-left
:
4px
;
width
:
auto
;
}
...
...
This diff is collapsed.
Click to expand it.
src/app/pages/common/ix-forms/components/ix-combobox2/ix-combobox2.component.ts
View file @
651a73e3
...
...
@@ -46,7 +46,7 @@ export class IxCombobox2Component implements ControlValueAccessor, OnInit {
formControl
=
new
FormControl
(
this
);
value
:
string
|
number
=
''
;
isDisabled
=
false
;
filterValue
=
''
;
filterValue
:
string
;
selectedOption
:
Option
=
null
;
syncOptions
:
Option
[];
...
...
@@ -79,14 +79,17 @@ export class IxCombobox2Component implements ControlValueAccessor, OnInit {
distinctUntilChanged
(),
untilDestroyed
(
this
),
).
subscribe
((
changedValue
:
string
)
=>
{
if
(
this
.
filterValue
===
changedValue
)
{
return
;
}
this
.
filterValue
=
changedValue
;
this
.
filterOptions
(
changedValue
);
});
this
.
filter
Options
(
''
);
this
.
filter
Changed$
.
next
(
''
);
}
filterOptions
(
filterValue
:
string
):
void
{
this
.
loading
=
t
rue
;
this
.
loading
=
t
his
.
filterValue
!==
''
;
this
.
cdr
.
markForCheck
();
this
.
provider
.
filter
(
this
.
options
,
filterValue
).
pipe
(
untilDestroyed
(
this
)).
subscribe
((
options
:
Option
[])
=>
{
this
.
loading
=
false
;
...
...
@@ -123,11 +126,12 @@ export class IxCombobox2Component implements ControlValueAccessor, OnInit {
if
(
atBottom
)
{
this
.
loading
=
true
;
this
.
cdr
.
markForCheck
();
this
.
provider
.
nextPage
(
this
.
filterValue
).
pipe
(
untilDestroyed
(
this
)).
subscribe
((
options
:
Option
[])
=>
{
this
.
loading
=
false
;
this
.
options
.
push
(...
options
);
this
.
cdr
.
markForCheck
();
});
this
.
provider
.
nextPage
(
this
.
filterValue
!==
null
||
this
.
filterValue
!==
undefined
?
this
.
filterValue
:
''
)
.
pipe
(
untilDestroyed
(
this
)).
subscribe
((
options
:
Option
[])
=>
{
this
.
loading
=
false
;
this
.
options
.
push
(...
options
);
this
.
cdr
.
markForCheck
();
});
}
});
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help