|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
import React, { useState, useRef } from "react"; |
|
|
|
|
import React, { useState } from "react"; |
|
|
|
|
import ScrollContainer from "react-indiana-drag-scroll"; |
|
|
|
|
|
|
|
|
|
import "./index.scss"; |
|
|
|
@ -10,12 +10,6 @@ import Month from "./Month.js"; |
|
|
|
|
const SelectYear = ({ items }) => { |
|
|
|
|
const [selectedYear, setSelectedYear] = useState(null); |
|
|
|
|
|
|
|
|
|
const inputRef = useRef(); |
|
|
|
|
|
|
|
|
|
function focus() { |
|
|
|
|
console.log(inputRef.current); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<section className="flex flex-row items-center mx-auto w-8/12 my-20"> |
|
|
|
|
<div className="flex flex-col items-center"> |
|
|
|
@ -36,7 +30,6 @@ const SelectYear = ({ items }) => { |
|
|
|
|
<div className="flex flex-col h-28" style={{}}> |
|
|
|
|
{items.map((item, index) => ( |
|
|
|
|
<p |
|
|
|
|
ref={inputRef} |
|
|
|
|
key={index} |
|
|
|
|
// onClick={() => setSelectedYear(item)}
|
|
|
|
|
onClick={() => { |
|
|
|
|