fix: Dont close param panel when enter

This commit is contained in:
1ambda 2017-03-17 03:03:10 +09:00
parent 088705b3b8
commit b4d774cde1
3 changed files with 10 additions and 3 deletions

View file

@ -255,7 +255,8 @@ limitations under the License.
<textarea class="form-control" rows="3"
ng-keypress="keyEventOnDynamicParameter($event)"
data-ng-model="config.parameter[config.chart.current][paramSpec.name]"
style="font-weight: 400; font-size: 12px;"></textarea>
style="font-weight: 400; font-size: 12px;">
</textarea>
</div>
</td>

View file

@ -59,6 +59,14 @@ export function isTextareaWidget(paramSpec) {
return paramSpec && paramSpec.widget === Widget.TEXTAREA;
}
export const AxisValueType = {
NUMBER: 'number',
INT: 'int',
FLOAT: 'float',
JSON: 'json',
STRING: 'string',
}
export const Aggregator = {
SUM: 'sum',
COUNT: 'count',

View file

@ -133,14 +133,12 @@ class AdvancedTransformation extends Transformation {
isTextareaWidget: function(paramSpec) { return isTextareaWidget(paramSpec) },
parameterChanged: (paramSpec) => {
console.log(configInstance.parameter[configInstance.chart.current])
self.emitConfig(configInstance)
},
keyEventOnDynamicParameter: (event) => {
if (event.which === 13 || event.keyCode === 13) {
/** enter */
configInstance.panel.parameterPanelOpened = !configInstance.panel.parameterPanelOpened
self.emitConfig(configInstance)
}
},