mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 23:12:25 -05:00 
			
		
		
		
	[chore/frogend] Restructure form data default values / update from Query data (#1422)
* eslint: set console use to error to catch debug littering in CI * remove debug logging * some form field restructuring, fixes submitted updates not being reflected * more form field restructuring * remove debug logger * simplify field updates * fix react state set during render when submitting import file * className instead of class * show Select hints again
This commit is contained in:
		
					parent
					
						
							
								0a9874329d
							
						
					
				
			
			
				commit
				
					
						47daddc10c
					
				
			
		
					 19 changed files with 153 additions and 86 deletions
				
			
		|  | @ -22,7 +22,6 @@ const React = require("react"); | |||
| 
 | ||||
| function TextInput({ label, field, ...inputProps }) { | ||||
| 	const { onChange, value, ref } = field; | ||||
| 	console.log(field.name, field.valid, field.value); | ||||
| 
 | ||||
| 	return ( | ||||
| 		<div className={`form-field text${field.valid ? "" : " invalid"}`}> | ||||
|  | @ -93,13 +92,13 @@ function Checkbox({ label, field, ...inputProps }) { | |||
| 	); | ||||
| } | ||||
| 
 | ||||
| function Select({ label, field, options, ...inputProps }) { | ||||
| function Select({ label, field, options, children, ...inputProps }) { | ||||
| 	const { onChange, value, ref } = field; | ||||
| 
 | ||||
| 	return ( | ||||
| 		<div className="form-field select"> | ||||
| 			<label> | ||||
| 				{label} | ||||
| 				{label} {children} | ||||
| 				<select | ||||
| 					{...{ onChange, value, ref }} | ||||
| 					{...inputProps} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue