feat: Save and close with enter key

This commit is contained in:
1ambda 2017-03-16 03:35:23 +09:00
parent 53f508c2d3
commit b1d9d31b97
2 changed files with 9 additions and 0 deletions

View file

@ -230,6 +230,7 @@ limitations under the License.
<div class="input-group">
<input type="text" class="form-control"
style="font-weight: 400; font-size: 12px; vertical-align:middle; border-radius: 5px;"
ng-keypress="keyEventOnDynamicParameter($event)"
data-ng-model="config.parameter[config.chart.current][paramSpec.name]" />
</div>
</td>

View file

@ -116,6 +116,14 @@ class AdvancedTransformation extends Transformation {
self.emitConfig(configInstance)
},
keyEventOnDynamicParameter: (event) => {
if (event.which == 13 || event.keyCode == 13) {
/** enter */
configInstance.panel.parameterPanelOpened = !configInstance.panel.parameterPanelOpened
self.emitConfig(configInstance)
}
},
axisChanged: function(e, ui, axisSpec) {
removeDuplicatedColumnsInMultiDimensionAxis(configInstance, axisSpec)
applyMaxAxisCount(configInstance, axisSpec)