created: 2021-05-02T09:52:59.000Z

React-admin の登録/更新画面でreadonlyなフィールドをつくる

Listコンポーネントで使う TextField などのコンポーネントを使えばよい。

A Field component displays a given property of a REST resource. Such components are used in the List and Show views, but you can also use them in the Edit and Create views for read-only fields.

  <Edit {...props}>
    <SimpleForm>
      // userId は readonly
      <TextField source="userId" />
      // expireAt は日付データのinput
      <DateInput source="expireAt" />
    </SimpleForm>
  </Edit>
systemdの思想と機能 Linuxを支えるシステム管理のためのソフトウェアスイート (Software Design plusシリーズ)
[ad] systemdの思想と機能 Linuxを支えるシステム管理のためのソフトウェアスイート (Software Design plusシリーズ)
森若 和雄 (単行本(ソフトカバー))