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';
|
import * as S from '../../styles/CurrencyInput.styles';
|
||||||
|
|
||||||
function CurrencyInput({ value, setValue }) {
|
function CurrencyInput({ value, setValue, autofocus }) {
|
||||||
const getRenderValue = () => {
|
const getRenderValue = () => {
|
||||||
if (value === '') {
|
if (value === '') {
|
||||||
return '';
|
return '';
|
||||||
@ -28,6 +28,7 @@ function CurrencyInput({ value, setValue }) {
|
|||||||
value={getRenderValue()}
|
value={getRenderValue()}
|
||||||
onChange={handleOnChange}
|
onChange={handleOnChange}
|
||||||
placeholder="가격을 입력해주세요"
|
placeholder="가격을 입력해주세요"
|
||||||
|
autoFocus={autofocus}
|
||||||
/>
|
/>
|
||||||
</S.CurrencyInput>
|
</S.CurrencyInput>
|
||||||
);
|
);
|
||||||
|
@ -11,6 +11,7 @@ function PriceStep({ gotoNextStep, gotoPrevStep, price, setPrice }) {
|
|||||||
<CurrencyInput
|
<CurrencyInput
|
||||||
value={price}
|
value={price}
|
||||||
setValue={setPrice}
|
setValue={setPrice}
|
||||||
|
autofocus
|
||||||
/>
|
/>
|
||||||
<ButtonArea>
|
<ButtonArea>
|
||||||
<Button
|
<Button
|
||||||
|
@ -18,6 +18,7 @@ function TextStep({ text, setText, gotoNextStep, gotoPrevStep }) {
|
|||||||
value={text}
|
value={text}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
$height={height}
|
$height={height}
|
||||||
|
autoFocus
|
||||||
/>
|
/>
|
||||||
<ButtonArea>
|
<ButtonArea>
|
||||||
<Button
|
<Button
|
||||||
|
Loading…
Reference in New Issue
Block a user