mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-11-11 05:10:51 +03:00
apply radio btn selection logic to insert item also
This commit is contained in:
parent
ae97c36c9d
commit
78ca9f38a7
@ -9,8 +9,6 @@ import TextInput from '../../../Common/CustomInputTypes/TextInput';
|
||||
import Button from '../../../Common/Button/Button';
|
||||
import { getPlaceholder, BOOLEAN, JSONB, JSONDTYPE, TEXT } from '../utils';
|
||||
|
||||
import { getParentNodeByClass } from '../../../../utils/domFunctions';
|
||||
|
||||
import { NotFoundError } from '../../../Error/PageNotFound';
|
||||
|
||||
class InsertItem extends Component {
|
||||
@ -81,12 +79,9 @@ class InsertItem extends Component {
|
||||
refs[colName] = { valueNode: null, nullNode: null, defaultNode: null };
|
||||
const inputRef = node => (refs[colName].valueNode = node);
|
||||
const clicker = e => {
|
||||
const checkboxLabel = getParentNodeByClass(e.target, 'radio-inline');
|
||||
if (checkboxLabel) {
|
||||
checkboxLabel.click();
|
||||
} else {
|
||||
e.target.parentNode.click();
|
||||
}
|
||||
e.target
|
||||
.closest('.radio-inline')
|
||||
.querySelector('input[type="radio"]').checked = true;
|
||||
e.target.focus();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user