mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
add auto-save functionality when click outside the textfield
This commit is contained in:
@@ -236,10 +236,11 @@ export default function Settings({ onChange, config }: ISettingsProps) {
|
||||
handleEdit();
|
||||
}
|
||||
}}
|
||||
onBlur={handleEdit}
|
||||
/>
|
||||
<IconButton
|
||||
aria-label="Save"
|
||||
onClick={() => handleEdit()}
|
||||
onClick={handleEdit}
|
||||
>
|
||||
{<CheckIcon />}
|
||||
</IconButton>
|
||||
@@ -247,6 +248,10 @@ export default function Settings({ onChange, config }: ISettingsProps) {
|
||||
) : (
|
||||
<Typography
|
||||
onClick={() => {
|
||||
// While editing a field, if the user clicks on some other field
|
||||
// This makes sure that the previous edit is saved
|
||||
handleEdit();
|
||||
|
||||
setEditOption({
|
||||
oldOption: option,
|
||||
newOption: option,
|
||||
|
||||
Reference in New Issue
Block a user