mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Automatic field width of chart parameters
This commit is contained in:
parent
eeb8c1caac
commit
090fb59194
@ -218,6 +218,7 @@
|
||||
|
||||
#chart-params .param {
|
||||
width: 6%;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
input {
|
||||
@ -658,6 +659,10 @@ function insertParam(name, value) {
|
||||
param_value.value = value;
|
||||
param_value.spellcheck = false;
|
||||
|
||||
let setWidth = e => { e.style.width = (e.value.length + 1) + 'ch' };
|
||||
if (value) { setWidth(param_value); }
|
||||
param_value.addEventListener('input', e => setWidth(e.target));
|
||||
|
||||
param_wrapper.appendChild(param_name);
|
||||
param_wrapper.appendChild(param_value);
|
||||
document.getElementById('chart-params').appendChild(param_wrapper);
|
||||
|
Loading…
Reference in New Issue
Block a user