1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-01-11 18:13:52 +02:00

Feature added: Pressing enter should create a category

This commit is contained in:
Rajat Dabade 2022-04-27 18:53:02 +05:30
parent d2c4a54d36
commit d5c8f59878

View File

@ -32,6 +32,7 @@ const CreateCategory = (props: Props): JSX.Element => {
className='CreateCategoryModal' className='CreateCategoryModal'
onClose={props.onClose} onClose={props.onClose}
> >
<form>
<div className='CreateCategory'> <div className='CreateCategory'>
<h3>{props.title}</h3> <h3>{props.title}</h3>
<input <input
@ -56,11 +57,13 @@ const CreateCategory = (props: Props): JSX.Element => {
filled={Boolean(name)} filled={Boolean(name)}
onClick={() => props.onCreate(name)} onClick={() => props.onCreate(name)}
disabled={!name} disabled={!name}
submit={true}
> >
{props.initialValue ? updateText : createText} {props.initialValue ? updateText : createText}
</Button> </Button>
</div> </div>
</div> </div>
</form>
</Dialog> </Dialog>
) )
} }