Fakultas Ilmu Komputer UI

Commit 320b2823 authored by Shafiya Adzhani's avatar Shafiya Adzhani
Browse files

[CHORES] add default value in employee dropdown

parent a879f1a2
......@@ -4,8 +4,8 @@ import DropdownArrow from '../../assets/dropdown.svg'
import {dataEmployee} from '../../data/employee'
import PropTypes from 'prop-types'
const EmployeeDropdown = ({setEmployeeData}) => {
const [selectedValue, setSelectedValue] = useState(null)
const EmployeeDropdown = ({setEmployeeData, defaultValue}) => {
const [selectedValue, setSelectedValue] = useState(defaultValue)
const [showDropdown, setShowDropdown] = useState(false)
const selectValue = (value) => {
......@@ -52,6 +52,7 @@ const EmployeeDropdown = ({setEmployeeData}) => {
EmployeeDropdown.propTypes = {
setEmployeeData: PropTypes.func,
defaultValue: PropTypes.string,
}
export default EmployeeDropdown
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment