@@ -3,7 +3,6 @@ import PropTypes from 'prop-types'
33import Context from '../context'
44import TextareaAutosize from 'react-textarea-autosize'
55import Modal , { ModalProps } from "../Shared/Modal/Modal"
6- import debounce from '../Shared/debounce'
76import Card , { PropTypeCard } from './cardType/Card'
87import Palette from './palette/palette'
98
@@ -32,7 +31,6 @@ function ModalCardEdit({ card = new Card(), index }) {
3231 modalProps . sideClose = true
3332 modalProps . onSideClick = unsetEditCard
3433
35-
3634 function open ( ) {
3735 setShowForm ( true )
3836 }
@@ -47,7 +45,7 @@ function ModalCardEdit({ card = new Card(), index }) {
4745 editCardContent ( index , name , text )
4846 }
4947
50- function onInputCange ( e ) {
48+ function onInputChange ( e ) {
5149 let name = card . name
5250 let text = card . text
5351 if ( e . target . id === "modal-edit-name" ) name = e . target . value
@@ -82,7 +80,7 @@ function ModalCardEdit({ card = new Card(), index }) {
8280 maxRows = { 3 }
8381 maxLength = "100"
8482 value = { card . name }
85- onChange = { debounce ( onInputCange , 700 ) }
83+ onChange = { onInputChange }
8684 />
8785
8886 < p style = { { fontWeight : "500" } } className = "mb-2 text-dark" >
@@ -99,7 +97,7 @@ function ModalCardEdit({ card = new Card(), index }) {
9997 minRows = { 3 }
10098 maxRows = { calcMaxRows ( ) }
10199 value = { card . text }
102- onChange = { debounce ( onInputCange , 1000 ) }
100+ onChange = { onInputChange }
103101 />
104102 </ React . Fragment >
105103 ) : (
0 commit comments