You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a low-priority as readonly types aren't really usable at the time IMHO (see microsoft/TypeScript#13347). I'll mark it as a bug but we won't wok on it in the near future.
What you were expecting:
SelectInput
choices should acceptReadonlyArray<T>
What happened instead:
SelectInput
choices does not acceptReadonlyArray<T>
Steps to reproduce:
"react-admin": "^4.12.3"
Related code:
https://stackblitz.com/edit/github-h13gjc?file=src%2Fposts%2FPostEdit.tsx
Other information:
My suggestion (though more than just the SelectInput needs to be inspected):
react-admin/packages/ra-core/src/form/useChoices.tsx
Line 16 in de8fbaa
This is a small example.
https://www.typescriptlang.org/play?#code/MYewdgzgLgBAtgVygQwEYBsCmBBATr5ATwC4Y8DCAeaXASzAHMA+GAXhgG0ByAMxBC4AaGF1TJcQkWIBeXALoBuAFChIsXJmQATcOkLkipAEqadYPQao16zNp179Jo8U5nzlSngjDAotcDCYAB7IcAAOWABi3sAAjAAUAPqIKBg4uAwQpJaUyGCETACUMADeSjAVMBpQCLhgygC+Hl4+fgHBoRGY0T4ATEm0cCloWHiZxqa6+vhEuflFpeWV1bX1Sk1KSh3hUTEJw2mWhcrbXT1x8RraU0cep7t98QejM4THWyE73TH9V2YWr3eQA
Environment
The text was updated successfully, but these errors were encountered: