{(provided) => (
{
}
{
valueCategory.options.length > 0 &&
- valueCategory.options.map((option, index) => generateValueRow(option, index))
+ valueCategory.options.map((option, index) => generateValueRow(valueCategory.id, option, index))
}
{provided.placeholder}
diff --git a/webapp/src/components/standardProperties/statusProperty/editableLabel/editableLabel.scss b/webapp/src/components/standardProperties/statusProperty/editableLabel/editableLabel.scss
index 295359cbd..d04030f1f 100644
--- a/webapp/src/components/standardProperties/statusProperty/editableLabel/editableLabel.scss
+++ b/webapp/src/components/standardProperties/statusProperty/editableLabel/editableLabel.scss
@@ -1,9 +1,10 @@
-.Label {
+.EditableLabel {
input {
border: none;
background: none;
border-bottom: 1px solid;
border-radius: 0;
max-width: 100%;
- }
+ text-transform: uppercase;
+ }
}
\ No newline at end of file
diff --git a/webapp/src/components/standardProperties/statusProperty/editableLabel/editableLabel.tsx b/webapp/src/components/standardProperties/statusProperty/editableLabel/editableLabel.tsx
index b63aeec7f..deba574f0 100644
--- a/webapp/src/components/standardProperties/statusProperty/editableLabel/editableLabel.tsx
+++ b/webapp/src/components/standardProperties/statusProperty/editableLabel/editableLabel.tsx
@@ -1,6 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
-import React from 'react'
+import React, {useState} from 'react'
import Label from '../../../../widgets/label'
@@ -11,23 +11,40 @@ import './editableLabel.scss'
type Props = {
option: IPropertyOption
editing?: boolean
+ focus?: boolean
+ onBlur?: (newOptionValue: IPropertyOption) => void
}
const EditableLabel = (props: Props): JSX.Element => {
- const {option} = props
+ const [value, setValue] = useState(props.option.value)
- const displayValue = ({option.value})
+ const handleOnBlur = () => {
+ const newOptionValue = {
+ ...props.option,
+ value,
+ }
+
+ if (props.onBlur) {
+ props.onBlur(newOptionValue)
+ }
+ }
+
+ const displayValue = ({props.option.value})
const editValue = (
setValue(e.target.value)}
+ onBlur={handleOnBlur}
/>
)
return (