[WIP] trying to validate empty parent account

This commit is contained in:
2025-01-30 08:19:10 +01:00
parent c1a6c0f572
commit fd92c57eb5
4 changed files with 70 additions and 8 deletions

View File

@@ -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)}

View File

@@ -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",