|
160 | 160 |
|
161 | 161 | function onPopupOpenedQueryResultTab(component) { |
162 | 162 | const parentContainerId = 'table-queryTab' |
163 | | - onPopupOpened(parentContainerId) |
| 163 | + onPopupOpened(parentContainerId, component) |
164 | 164 | } |
165 | 165 |
|
166 | 166 | function onPopupOpenedDataTab(component) { |
167 | 167 | const parentContainerId = 'data-tab-panel' |
168 | | - onPopupOpened(parentContainerId) |
| 168 | + onPopupOpened(parentContainerId, component) |
169 | 169 | } |
170 | 170 |
|
171 | 171 | function onPopupOpenedSchemaTab(component) { |
172 | 172 | const parentContainerId = 'schema' |
173 | | - onPopupOpened(parentContainerId) |
| 173 | + onPopupOpened(parentContainerId, component) |
174 | 174 | } |
175 | 175 |
|
176 | 176 | function onPopupOpenedMetaDataTab(component) { |
177 | 177 | const parentContainerId = 'metadata' |
178 | | - onPopupOpened(parentContainerId) |
| 178 | + onPopupOpened(parentContainerId, component) |
179 | 179 | } |
180 | 180 |
|
181 | 181 | function containsHTML(str) { |
|
192 | 192 | .replace(/'/g, ''') |
193 | 193 | } |
194 | 194 |
|
195 | | - function onPopupOpened(parentContainerId) { |
196 | | - const element = document.getElementsByClassName( |
| 195 | + function onPopupOpened(parentContainerId, component) { |
| 196 | + let element = document.getElementsByClassName( |
197 | 197 | 'tabulator-popup tabulator-popup-container' |
198 | 198 | )[0] |
| 199 | + |
| 200 | + const cellValue = component.getValue() |
| 201 | + |
199 | 202 | let innerHTML = element.innerHTML |
200 | 203 | let style = element.style |
201 | 204 |
|
|
220 | 223 | tab: tab, |
221 | 224 | }) |
222 | 225 | } else { |
| 226 | + innerHTML = cellValue |
223 | 227 | if (containsHTML(innerHTML)) { |
224 | 228 | element.innerHTML = escapeHtml(innerHTML) |
225 | 229 | } |
|
0 commit comments