From a3d5c4e5a7926f16eaaa23607343682082b839c5 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Wed, 18 Dec 2019 15:22:42 +0100
Subject: [PATCH] Properly prefix the icon path for the select arrow icon.

See https://gitlab.tugraz.at/VPU/WebComponents/datatableview/issues/2
---
 packages/common/styles.js   | 5 +++--
 packages/common/vpu-icon.js | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/packages/common/styles.js b/packages/common/styles.js
index 87b7f679..1ad9c80b 100644
--- a/packages/common/styles.js
+++ b/packages/common/styles.js
@@ -1,4 +1,5 @@
-import {css} from 'lit-element';
+import {css, unsafeCSS} from 'lit-element';
+import {getIconSVGURL} from './vpu-icon.js';
 
 /**
  * We want to have "neutral" colors here
@@ -121,7 +122,7 @@ export function getGeneralCSS() {
         select:not(.select) {
             -moz-appearance: none;
             -webkit-appearance: none;
-            background: calc(100% - 0.2rem) center no-repeat url("/local/vpu-common/icons/chevron-down.svg");
+            background: calc(100% - 0.2rem) center no-repeat url("${unsafeCSS(getIconSVGURL('chevron-down'))}");
             background-size: 25%;
             border-color: black;
             border-width: 1px;
diff --git a/packages/common/vpu-icon.js b/packages/common/vpu-icon.js
index af0e4487..c6e8bd39 100644
--- a/packages/common/vpu-icon.js
+++ b/packages/common/vpu-icon.js
@@ -17,7 +17,7 @@ const errorIcon = `
 </svg>
 `;
 
-function getIconSVGURL(name) {
+export function getIconSVGURL(name) {
     return commonUtils.getAssetURL('local/vpu-common/icons/' + encodeURI(name) + '.svg');
 }
 
-- 
GitLab