Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TypeScript] Compilation error when using the <InputGuesser multiline> attribute #574

Closed
fzaninotto opened this issue Jul 25, 2024 · 0 comments · Fixed by #576
Closed

[TypeScript] Compilation error when using the <InputGuesser multiline> attribute #574

fzaninotto opened this issue Jul 25, 2024 · 0 comments · Fixed by #576
Assignees

Comments

@fzaninotto
Copy link
Contributor

API Platform version(s) affected: 5.0.0

Description

InputGuesser is supposed to pass down all the props it receives to the guessed input. So it must accept all the possible props of all possible inputs.

This works fine for many props (label, readOnly, etc) but not for multiline:

image

How to reproduce

Write the following code:

import { EditGuesser, InputGuesser } from "@api-platform/admin";

export const BookEdit = () => (
  <EditGuesser warnWhenUnsavedChanges>
    <InputGuesser source="isbn" label="ISBN" />
    <InputGuesser source="title" />
    <InputGuesser source="author" />
    <InputGuesser source="description" multiline />
    <InputGuesser source="publicationDate" />
  </EditGuesser>
);

Possible Solution

Fix the types!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant