mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
commit
7f818b8b19
@ -82,7 +82,9 @@ class EditItem extends Component {
|
|||||||
refs[colName].valueNode = node;
|
refs[colName].valueNode = node;
|
||||||
};
|
};
|
||||||
const clicker = e => {
|
const clicker = e => {
|
||||||
e.target.closest('.radio-inline').click();
|
e.target
|
||||||
|
.closest('.radio-inline')
|
||||||
|
.querySelector('input[type="radio"]').checked = true;
|
||||||
e.target.focus();
|
e.target.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,8 +9,6 @@ import TextInput from '../../../Common/CustomInputTypes/TextInput';
|
|||||||
import Button from '../../../Common/Button/Button';
|
import Button from '../../../Common/Button/Button';
|
||||||
import { getPlaceholder, BOOLEAN, JSONB, JSONDTYPE, TEXT } from '../utils';
|
import { getPlaceholder, BOOLEAN, JSONB, JSONDTYPE, TEXT } from '../utils';
|
||||||
|
|
||||||
import { getParentNodeByClass } from '../../../../utils/domFunctions';
|
|
||||||
|
|
||||||
import { NotFoundError } from '../../../Error/PageNotFound';
|
import { NotFoundError } from '../../../Error/PageNotFound';
|
||||||
|
|
||||||
class InsertItem extends Component {
|
class InsertItem extends Component {
|
||||||
@ -81,12 +79,9 @@ class InsertItem extends Component {
|
|||||||
refs[colName] = { valueNode: null, nullNode: null, defaultNode: null };
|
refs[colName] = { valueNode: null, nullNode: null, defaultNode: null };
|
||||||
const inputRef = node => (refs[colName].valueNode = node);
|
const inputRef = node => (refs[colName].valueNode = node);
|
||||||
const clicker = e => {
|
const clicker = e => {
|
||||||
const checkboxLabel = getParentNodeByClass(e.target, 'radio-inline');
|
e.target
|
||||||
if (checkboxLabel) {
|
.closest('.radio-inline')
|
||||||
checkboxLabel.click();
|
.querySelector('input[type="radio"]').checked = true;
|
||||||
} else {
|
|
||||||
e.target.parentNode.click();
|
|
||||||
}
|
|
||||||
e.target.focus();
|
e.target.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user