From fb7ab71820cad06b37521788fb10cbbdd4514cce Mon Sep 17 00:00:00 2001 From: wuls Date: Mon, 4 Sep 2023 09:36:01 +0800 Subject: [PATCH 1/2] fix add a new property placeholder --- packages/toolpad-components/src/TextField.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/toolpad-components/src/TextField.tsx b/packages/toolpad-components/src/TextField.tsx index 68a8d12dd11..efe1922cbb0 100644 --- a/packages/toolpad-components/src/TextField.tsx +++ b/packages/toolpad-components/src/TextField.tsx @@ -103,6 +103,10 @@ export default createBuiltin(FormWrappedTextField, { helperText: 'Whether the input should occupy all available horizontal space.', type: 'boolean', }, + placeholder: { + helperText: 'The short hint displayed in the `input` before the user enters a value.', + type: 'string', + }, disabled: { helperText: 'Whether the input is disabled.', type: 'boolean', From 1bf5e767c4fa0342f143b73efe862201581edb19 Mon Sep 17 00:00:00 2001 From: wuls Date: Mon, 4 Sep 2023 09:48:25 +0800 Subject: [PATCH 2/2] fix --- docs/data/toolpad/reference/components/text-field.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/data/toolpad/reference/components/text-field.md b/docs/data/toolpad/reference/components/text-field.md index 2ef237024e2..d99c742ba55 100644 --- a/docs/data/toolpad/reference/components/text-field.md +++ b/docs/data/toolpad/reference/components/text-field.md @@ -16,6 +16,7 @@ The MUI [TextField](https://mui.com/material-ui/react-text-field/) component let | variant | string | "outlined" | One of the available MUI TextField [variants](https://mui.com/material-ui/react-button/#basic-button). Possible values are `outlined`, `filled` or `standard` | | size | string | "small" | The size of the input. One of `small`, or `medium`. | | fullWidth | boolean | | Whether the input should occupy all available horizontal space. | +| placeholder | string | | The short hint displayed in the `input` before the user enters a value. | | disabled | boolean | | Whether the input is disabled. | | name | string | | Name of this input. Used as a reference in form data. | | isRequired | boolean | false | Whether the input is required to have a value. |