Skip to content

Commit 534a3e5

Browse files
authored
fix(icon-service): icon not being rendered on addSvgIconFromText (#14559)
The icon component does not render newly registered icons with addSvgIconFromText when the family is not yet registerd.
1 parent 773c36b commit 534a3e5

File tree

2 files changed

+54
-53
lines changed

2 files changed

+54
-53
lines changed

projects/igniteui-angular/src/lib/icon/icon.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ export class IgxIconService {
250250

251251
if (!this.isSvgIconCached(name, family)) {
252252
this._families.set(family, { className: family, type: "svg" });
253+
253254
this.fetchSvg(url).subscribe((res) => {
254255
this.cacheSvgIcon(name, res, family, stripMeta);
255-
this._iconLoaded.next({ name, value: res, family });
256256
});
257257
}
258258
} else {
@@ -343,6 +343,7 @@ export class IgxIconService {
343343

344344
if (!this._cachedIcons.has(family)) {
345345
this._cachedIcons.set(family, new Map<string, SafeHtml>());
346+
this._iconLoaded.next({ name, value, family });
346347
}
347348

348349
if (svg) {

projects/igniteui-angular/src/lib/icon/reference_table.md

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -275,55 +275,55 @@ Default Component Icons:
275275
- keyboard_arrow_down
276276

277277

278-
| Family | Name | Ref Family | Ref Name | Used By | Theme |
279-
|---------|----------------|------------|----------------------|---------------------------------------------------------|---------------------------|
280-
| default | more_vert | material | more_vert | Action Strip, Grid | All |
281-
| default | expand | material | expand_more | Grid, Expansion Panel, Filtering Row | All |
282-
| default | collapse | material | expand_less | Grid, Expansion Panel | All |
283-
| default | arrow_next | material | keyboard_arrow_right | Month Picker, Calendar | All |
284-
| default | arrow_prev | material | keyboard_arrow_left | Month Picker, Calendar | All |
285-
| default | carousel_next | material | keyboard_arrow_right | Carousel | Indigo |
286-
| default | carousel_prev | material | keyboard_arrow_left | Carousel | Indigo |
287-
| default | carousel_next | material | arrow_forward | Carousel | Material |
288-
| default | carousel_prev | material | arrow_back | Carousel | Material |
289-
| default | next | material | navigate_next | Grid, Tabs | Indigo |
290-
| default | prev | material | navigate_before | Grid, Tabs | Indigo |
291-
| default | next | material | navigate_next | Filtering Row | All |
292-
| default | prev | material | navigate_before | Filtering Row | All |
293-
| default | selected | material | done | Grid, Chip, Filtering Row | All |
294-
| default | remove | material | cancel | Grid, Chip | All |
295-
| default | clear | material | cancel | Combo, Simple Combo, Time Picker, Date Picker | Material |
296-
| default | clear | material | clear | Combo, Simple Combo, Time Picker, Date Picker | Indigo, Fluent, Bootstrap |
297-
| default | clear | material | clear | Grid, Input Group, Excel Style Filtering, Filtering Row | All |
298-
| default | clock | material | access_time | Time Picker | All |
299-
| default | filter_list | material | filter_list | Grid, Filtering Cell, Excel Style Filtering | All |
300-
| default | add | material | add | Grid, Query Builder, Excel Style Filtering | All |
301-
| default | close | material | close | Grid, Query Builder, Filtering Row | All |
302-
| default | check | material | check | Grid, Query Builder | All |
303-
| default | delete | material | delete | Grid, Query Builder | All |
304-
| default | edit | material | edit | Grid, Query Builder | All |
305-
| default | first_page | material | first_page | Grid, Paginator | All |
306-
| default | last_page | material | last_page | Grid, Paginator | All |
307-
| default | chevron_left | material | chevron_left | Grid, Paginator | All |
308-
| default | chevron_right | material | chevron_right | Grid, Paginator, Excel Style Filtering | All |
309-
| default | refresh | material | refresh | Grid, Filtering Row | All |
310-
| default | visibility | material | visibility | Grid, Excel Style Filtering | All |
311-
| default | visibility_off | material | visibility_off | Grid, Excel Style Filtering | All |
312-
| default | arrow_back | material | arrow_back | Grid, Excel Style Filtering | All |
313-
| default | arrow_forward | material | arrow_forward | Grid, Excel Style Filtering | All |
314-
| default | arrow_upward | material | arrow_upward | Grid, Excel Style Filtering | All |
315-
| default | arrow_downward | material | arrow_downward | Grid, Excel Style Filtering | All |
316-
| default | today | material | today | Date Picker | All |
317-
| default | date_range | material | date_range | Date Range Picker | All |
318-
| default | expand | material | arrow_drop_down | Grid | All |
319-
| default | import_export | material | import_export | Grid | All |
320-
| default | table_rows | material | table_rows | Grid | All |
321-
| default | view_column | material | view_column | Grid | All |
322-
| default | functions | material | functions | Grid, Pivot Data Selector | All |
323-
| combo | expand | material | expand_more | Combo, Simple Combo, Select | Material |
324-
| combo | collapse | material | expand_less | Combo, Simple Combo, Select | Material |
325-
| combo | expand | material | arrow_drop_down | Combo, Simple Combo, Select | Indigo, Fluent, Bootstrap |
326-
| combo | collapse | material | arrow_drop_up | Combo, Simple Combo, Select | Indigo, Fluent, Bootstrap |
327-
| combo | case-sensitive | imx-icons | case-sensitive | Combo, Simple Combo | All |
328-
| tree | expand | material | keyboard_arrow_right | TreeNode | All |
329-
| tree | collapse | material | keyboard_arrow_down | TreeNode | All |
278+
| Icon Family | Icon Name | Target Family | Target Name | Used By | Theme |
279+
|-------------|----------------|---------------|----------------------|---------------------------------------------------------|---------------------------|
280+
| default | more_vert | material | more_vert | Action Strip, Grid | All |
281+
| default | expand | material | expand_more | Grid, Expansion Panel, Filtering Row | All |
282+
| default | collapse | material | expand_less | Grid, Expansion Panel | All |
283+
| default | arrow_next | material | keyboard_arrow_right | Month Picker, Calendar | All |
284+
| default | arrow_prev | material | keyboard_arrow_left | Month Picker, Calendar | All |
285+
| default | carousel_next | material | keyboard_arrow_right | Carousel | Indigo |
286+
| default | carousel_prev | material | keyboard_arrow_left | Carousel | Indigo |
287+
| default | carousel_next | material | arrow_forward | Carousel | Material |
288+
| default | carousel_prev | material | arrow_back | Carousel | Material |
289+
| default | next | material | navigate_next | Grid, Tabs | Indigo |
290+
| default | prev | material | navigate_before | Grid, Tabs | Indigo |
291+
| default | next | material | navigate_next | Filtering Row | All |
292+
| default | prev | material | navigate_before | Filtering Row | All |
293+
| default | selected | material | done | Grid, Chip, Filtering Row | All |
294+
| default | remove | material | cancel | Grid, Chip | All |
295+
| default | clear | material | cancel | Combo, Simple Combo, Time Picker, Date Picker | Material |
296+
| default | clear | material | clear | Combo, Simple Combo, Time Picker, Date Picker | Indigo, Fluent, Bootstrap |
297+
| default | clear | material | clear | Grid, Input Group, Excel Style Filtering, Filtering Row | All |
298+
| default | clock | material | access_time | Time Picker | All |
299+
| default | filter_list | material | filter_list | Grid, Filtering Cell, Excel Style Filtering | All |
300+
| default | add | material | add | Grid, Query Builder, Excel Style Filtering | All |
301+
| default | close | material | close | Grid, Query Builder, Filtering Row | All |
302+
| default | check | material | check | Grid, Query Builder | All |
303+
| default | delete | material | delete | Grid, Query Builder | All |
304+
| default | edit | material | edit | Grid, Query Builder | All |
305+
| default | first_page | material | first_page | Grid, Paginator | All |
306+
| default | last_page | material | last_page | Grid, Paginator | All |
307+
| default | chevron_left | material | chevron_left | Grid, Paginator | All |
308+
| default | chevron_right | material | chevron_right | Grid, Paginator, Excel Style Filtering | All |
309+
| default | refresh | material | refresh | Grid, Filtering Row | All |
310+
| default | visibility | material | visibility | Grid, Excel Style Filtering | All |
311+
| default | visibility_off | material | visibility_off | Grid, Excel Style Filtering | All |
312+
| default | arrow_back | material | arrow_back | Grid, Excel Style Filtering | All |
313+
| default | arrow_forward | material | arrow_forward | Grid, Excel Style Filtering | All |
314+
| default | arrow_upward | material | arrow_upward | Grid, Excel Style Filtering | All |
315+
| default | arrow_downward | material | arrow_downward | Grid, Excel Style Filtering | All |
316+
| default | today | material | today | Date Picker | All |
317+
| default | date_range | material | date_range | Date Range Picker | All |
318+
| default | expand | material | arrow_drop_down | Grid | All |
319+
| default | import_export | material | import_export | Grid | All |
320+
| default | table_rows | material | table_rows | Grid | All |
321+
| default | view_column | material | view_column | Grid | All |
322+
| default | functions | material | functions | Grid, Pivot Data Selector | All |
323+
| combo | expand | material | expand_more | Combo, Simple Combo, Select | Material |
324+
| combo | collapse | material | expand_less | Combo, Simple Combo, Select | Material |
325+
| combo | expand | material | arrow_drop_down | Combo, Simple Combo, Select | Indigo, Fluent, Bootstrap |
326+
| combo | collapse | material | arrow_drop_up | Combo, Simple Combo, Select | Indigo, Fluent, Bootstrap |
327+
| combo | case-sensitive | imx-icons | case-sensitive | Combo, Simple Combo | All |
328+
| tree | expand | material | keyboard_arrow_right | TreeNode | All |
329+
| tree | collapse | material | keyboard_arrow_down | TreeNode | All |

0 commit comments

Comments
 (0)