[WIP] trying to validate empty parent account
This commit is contained in:
@@ -10,7 +10,7 @@ export const ForeignKeyWidget = (props: WidgetProps) => {
|
||||
|
||||
const valueResult = useOne({
|
||||
resource: resource,
|
||||
id: props.value
|
||||
id: props.value != "" ? props.value : undefined
|
||||
});
|
||||
|
||||
const [inputValue, setInputValue] = useState<string>("");
|
||||
@@ -42,6 +42,7 @@ export const ForeignKeyWidget = (props: WidgetProps) => {
|
||||
onChange={(event, newValue) => {
|
||||
setSelectedValue(newValue)
|
||||
props.onChange(newValue ? newValue.id : "")
|
||||
return true
|
||||
}}
|
||||
//inputValue={inputValue}
|
||||
onInputChange={(event, newInputValue) => setInputValue(newInputValue)}
|
||||
|
||||
@@ -15,6 +15,7 @@ export const AccountList: React.FC = () => {
|
||||
() => [
|
||||
{ field: "id", headerName: "ID" },
|
||||
{ field: "name", headerName: "Name", flex: 1 },
|
||||
{ field: "path", headerName: "path", flex: 1 },
|
||||
{ field: "type", headerName: "Type", flex: 0.3 },
|
||||
{
|
||||
field: "actions",
|
||||
|
||||
Reference in New Issue
Block a user