Skip to content

ReferenceArrayInput TypeScript error with alwaysOn prop #10859

@dricholm

Description

@dricholm

What you were expecting:
When using ReferenceArrayInput for filters there are cases when I want to use the alwaysOn prop so it's always shown.
Only happenes after upgrading from react-admin 5.7.4 to the latest, 5.10.0.

What happened instead:
TypeScript error:

Property 'alwaysOn' does not exist on type 'IntrinsicAttributes & ReferenceArrayInputProps'.

Possibly from the latest update, #10833, but haven't checked very deep.

Steps to reproduce:
Using react-admin 5.10.0, in a List component try to add a <ReferenceArrayInput alwaysOn /> to the filters prop.

Related code:
Since it's quite straight forward to reproduce and a TS error didn't create a full reproduction.

<List filters={[<ReferenceArrayInput alwaysOn key='test' source='test' />]}>
  <Datagrid>
    <TextField source='id' />
  </Datagrid>
</List>

Other information:

Environment

  • React-admin version: 5.10.0
  • Last version that did not exhibit the issue (if applicable): 5.7.4
  • React version: 18.3.1
  • Browser: Chrome
  • Stack trace (in case of a JS error): -

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions