refactor(components): update pairing selector
- add data-testid attr - change placement of menu popup - allow selection clearing
This commit is contained in:
		
							parent
							
								
									a3fc1d0f9b
								
							
						
					
					
						commit
						3afcd2b602
					
				| @ -19,7 +19,15 @@ | |||||||
| 	<a-form-item label="Pairings"> | 	<a-form-item label="Pairings"> | ||||||
| 		<a-row :gutter="5" :wrap="true" v-for="(field, idx) in fields" :key="field.key"> | 		<a-row :gutter="5" :wrap="true" v-for="(field, idx) in fields" :key="field.key"> | ||||||
| 			<Field :name="fname + 'relationships' + `[${idx}]`"> | 			<Field :name="fname + 'relationships' + `[${idx}]`"> | ||||||
| 				<a-select mode="multiple" v-bind="$attrs" :options="opts" v-model:value="field.value as string[]" @change="(val) => update(idx, val as string[])"> | 				<a-select | ||||||
|  | 					mode="multiple" | ||||||
|  | 					placement="topLeft" | ||||||
|  | 					:data-testid="`${$attrs['data-testid']}.${idx}`" | ||||||
|  | 					:options="opts" | ||||||
|  | 					v-model:value="field.value as string[]" | ||||||
|  | 					@change="(val) => update(idx, val as string[])" | ||||||
|  | 					:allow-clear="true" | ||||||
|  | 				> | ||||||
| 					<template #removeIcon> | 					<template #removeIcon> | ||||||
| 						<i class="far fa-circle-x" /> | 						<i class="far fa-circle-x" /> | ||||||
| 					</template> | 					</template> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user