Auto-select text when editing costs for receiving
This commit is contained in:
		
							parent
							
								
									a007606863
								
							
						
					
					
						commit
						b2aea57da6
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -103,6 +103,7 @@ | |||
|                    ref="input" | ||||
|                    v-show="editing" | ||||
|                    @keydown.native="inputKeyDown" | ||||
|                    @focus="selectAll" | ||||
|                    @blur="inputBlur" | ||||
|                    style="width: 6rem;"> | ||||
|           </b-input> | ||||
|  | @ -189,6 +190,12 @@ | |||
|             }, | ||||
|             methods: { | ||||
| 
 | ||||
|                 selectAll() { | ||||
|                     // nb. must traverse into the <b-input> element | ||||
|                     let trueInput = this.$refs.input.$el.firstChild | ||||
|                     trueInput.select() | ||||
|                 }, | ||||
| 
 | ||||
|                 startEdit() { | ||||
|                     this.inputValue = this.value | ||||
|                     this.editing = true | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar