master
mahdi andalib 3 years ago
parent 8bb6514c04
commit ab36d448b0
  1. 9
      src/components/SelectYear/index.js

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

Loading…
Cancel
Save