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

fix add a new property placeholder #2622

Merged
merged 2 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/data/toolpad/reference/components/text-field.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The MUI [TextField](https://mui.com/material-ui/react-text-field/) component let
| <span class="prop-name">variant</span> | <span class="prop-type">string</span> | <span class="prop-default">"outlined"</span> | One of the available MUI TextField [variants](https://mui.com/material-ui/react-button/#basic-button). Possible values are `outlined`, `filled` or `standard` |
| <span class="prop-name">size</span> | <span class="prop-type">string</span> | <span class="prop-default">"small"</span> | The size of the input. One of `small`, or `medium`. |
| <span class="prop-name">fullWidth</span> | <span class="prop-type">boolean</span> | | Whether the input should occupy all available horizontal space. |
| <span class="prop-name">placeholder</span> | <span class="prop-type">string</span> | | The short hint displayed in the `input` before the user enters a value. |
| <span class="prop-name">disabled</span> | <span class="prop-type">boolean</span> | | Whether the input is disabled. |
| <span class="prop-name">name</span> | <span class="prop-type">string</span> | | Name of this input. Used as a reference in form data. |
| <span class="prop-name">isRequired</span> | <span class="prop-type">boolean</span> | <span class="prop-default">false</span> | Whether the input is required to have a value. |
Expand Down
4 changes: 4 additions & 0 deletions packages/toolpad-components/src/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading