refactor: modals refactored
This commit is contained in:
@ -29,8 +29,8 @@ const Board: FC<Props> = ({ board }) => {
|
||||
onMouseEnter={() => setIsHovered(true)}
|
||||
onMouseLeave={() => setIsHovered(false)}>
|
||||
<InPlaceInput
|
||||
defaultValue={board.name}
|
||||
onComplete={value =>
|
||||
value={board.name}
|
||||
onChange={value =>
|
||||
boardsCrud.onUpdate(board.id, { name: value })
|
||||
}
|
||||
inputStyles={{
|
||||
|
||||
@ -11,7 +11,7 @@ const CreateBoardButton = () => {
|
||||
<Flex style={{ borderBottom: "2px solid gray" }}>
|
||||
<InPlaceInput
|
||||
placeholder={"Название доски"}
|
||||
onComplete={boardsCrud.onCreate}
|
||||
onChange={boardsCrud.onCreate}
|
||||
getChildren={startEditing => (
|
||||
<Box
|
||||
onClick={startEditing}
|
||||
|
||||
@ -17,7 +17,7 @@ const CreateStatusButton = () => {
|
||||
className={styles["inner-container"]}>
|
||||
<InPlaceInput
|
||||
placeholder={"Название колонки"}
|
||||
onComplete={statusesCrud.onCreate}
|
||||
onChange={statusesCrud.onCreate}
|
||||
getChildren={startEditing => (
|
||||
<Center
|
||||
p={"sm"}
|
||||
|
||||
@ -31,8 +31,8 @@ const StatusColumnHeader: FC<Props> = ({ status, isDragging }) => {
|
||||
mb={"xs"}
|
||||
className={styles.header}>
|
||||
<InPlaceInput
|
||||
defaultValue={status.name}
|
||||
onComplete={value => handleSave(value)}
|
||||
value={status.name}
|
||||
onChange={value => handleSave(value)}
|
||||
inputStyles={{
|
||||
input: {
|
||||
height: 25,
|
||||
|
||||
Reference in New Issue
Block a user