Label Input Bugs Fixed

main
Pedram Keshavarzi 3 years ago
parent d879791dae
commit 156a4f4364
  1. 4
      src/view/addProduct/components/lable.js

@ -29,7 +29,7 @@ const LableInput = () => {
<div className="flex px-4 mb-2">
<input type="text" className="bg-white border border-grayE0 h-12 w-full outline-none px-2 ml-2 rounded-md" id="lableInput"
onKeyDown={(e) => {
if (e.key == 'Enter' && document.getElementById('colorInput').value) {
if (e.key == 'Enter' && document.getElementById('colorInput').value && document.getElementById('colorInput').value && tags.length < 3) {
setTag({
title: e.target.value,
color: document.getElementById('colorInput').value
@ -57,7 +57,7 @@ const LableInput = () => {
<button className="bg-grayE0 w-24 h-14 mx-2 font-bold text-gray-600 rounded-lg" onClick={() => {
<button className="bg-grayE0 w-24 h-14 mx-2 font-bold text-gray-600 rounded-lg" onClick={() => { tags.length < 3 && document.getElementById('lableInput').value &&
setTag({
title: document.getElementById('lableInput').value,
color: document.getElementById('colorInput').value

Loading…
Cancel
Save