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

[RFR] Change LongTextInput to TextInput in examples/simple #3544

Merged
merged 1 commit into from
Aug 20, 2019
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
3 changes: 1 addition & 2 deletions examples/simple/src/comments/CommentCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
Create,
DateInput,
TextInput,
LongTextInput,
SimpleForm,
required,
minLength,
Expand All @@ -28,7 +27,7 @@ const CommentCreate = props => (
fullWidth
/>
<DateInput source="created_at" />
<LongTextInput source="body" />
<TextInput source="body" fullWidth={true} multiline={true} />
</SimpleForm>
</Create>
);
Expand Down
6 changes: 3 additions & 3 deletions examples/simple/src/comments/CommentEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
EditActions,
useEditController,
Link,
LongTextInput,
ReferenceInput,
SimpleForm,
TextInput,
Expand Down Expand Up @@ -87,10 +86,11 @@ const CommentEdit = props => {
fullWidth
/>
<DateInput source="created_at" fullWidth />
<LongTextInput
<TextInput
source="body"
validate={minLength(10)}
fullWidth
fullWidth={true}
multiline={true}
/>
</SimpleForm>
)}
Expand Down
8 changes: 6 additions & 2 deletions examples/simple/src/comments/PostQuickCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { useSelector, useDispatch } from 'react-redux';
import { makeStyles } from '@material-ui/core/styles';
import {
CREATE,
LongTextInput,
SaveButton,
SimpleForm,
TextInput,
Expand Down Expand Up @@ -75,7 +74,12 @@ const PostQuickCreate = ({ onCancel, onSave, ...props }) => {
{...props}
>
<TextInput source="title" validate={required()} />
<LongTextInput source="teaser" validate={required()} />
<TextInput
source="teaser"
validate={required()}
fullWidth={true}
multiline={true}
/>
</SimpleForm>
);
};
Expand Down
3 changes: 1 addition & 2 deletions examples/simple/src/posts/PostCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
Create,
DateInput,
FormDataConsumer,
LongTextInput,
NumberInput,
ReferenceInput,
SaveButton,
Expand Down Expand Up @@ -127,7 +126,7 @@ const PostCreate = ({ permissions, ...props }) => {
}}
>
<TextInput autoFocus source="title" />
<LongTextInput source="teaser" />
<TextInput source="teaser" fullWidth={true} multiline={true} />
<RichTextInput source="body" validate={required()} />
<FormDataConsumer>
{({ formData, ...rest }) =>
Expand Down
5 changes: 3 additions & 2 deletions examples/simple/src/posts/PostEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
FormTab,
ImageField,
ImageInput,
LongTextInput,
NumberInput,
ReferenceArrayInput,
ReferenceManyField,
Expand Down Expand Up @@ -49,7 +48,9 @@ const PostEdit = props => (
<FormTab label="post.form.summary">
<DisabledInput source="id" />
<TextInput source="title" validate={required()} resettable />
<LongTextInput
<TextInput
multiline={true}
fullWidth={true}
source="teaser"
validate={required()}
resettable
Expand Down