mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
link icon helper dynamic icon
This commit is contained in:
@@ -35,6 +35,7 @@ export default class LinkFieldIconHelper {
|
||||
* @param {import('views/fields/link').default} view
|
||||
* @param {{
|
||||
* iconClass: string,
|
||||
* getIconClass: function(): string|null,
|
||||
* getColor: function(): string,
|
||||
* }} options
|
||||
*/
|
||||
@@ -92,6 +93,14 @@ export default class LinkFieldIconHelper {
|
||||
icon.className = 'icon-in-input ' + this.options.iconClass;
|
||||
icon.style.color = this.options.getColor();
|
||||
|
||||
const iconClass = this.options.getIconClass();
|
||||
|
||||
if (!iconClass) {
|
||||
return;
|
||||
}
|
||||
|
||||
icon.className += ' ' + iconClass;
|
||||
|
||||
const input = view.element.querySelector('.input-group > input');
|
||||
|
||||
if (!input) {
|
||||
|
||||
Reference in New Issue
Block a user