feat: Add autofocus on write form
This commit is contained in:
parent
23738335df
commit
9280d9b710
@ -1,6 +1,6 @@
|
||||
import * as S from '../../styles/CurrencyInput.styles';
|
||||
|
||||
function CurrencyInput({ value, setValue }) {
|
||||
function CurrencyInput({ value, setValue, autofocus }) {
|
||||
const getRenderValue = () => {
|
||||
if (value === '') {
|
||||
return '';
|
||||
@ -28,6 +28,7 @@ function CurrencyInput({ value, setValue }) {
|
||||
value={getRenderValue()}
|
||||
onChange={handleOnChange}
|
||||
placeholder="가격을 입력해주세요"
|
||||
autoFocus={autofocus}
|
||||
/>
|
||||
</S.CurrencyInput>
|
||||
);
|
||||
|
@ -11,6 +11,7 @@ function PriceStep({ gotoNextStep, gotoPrevStep, price, setPrice }) {
|
||||
<CurrencyInput
|
||||
value={price}
|
||||
setValue={setPrice}
|
||||
autofocus
|
||||
/>
|
||||
<ButtonArea>
|
||||
<Button
|
||||
|
@ -18,6 +18,7 @@ function TextStep({ text, setText, gotoNextStep, gotoPrevStep }) {
|
||||
value={text}
|
||||
onChange={handleChange}
|
||||
$height={height}
|
||||
autoFocus
|
||||
/>
|
||||
<ButtonArea>
|
||||
<Button
|
||||
|
Loading…
Reference in New Issue
Block a user