Add minimum height to container to prevent loading flashing

This commit is contained in:
Tanner Collin 2020-02-01 02:36:15 +00:00
parent baeda4acb9
commit 63d83ec2f6
4 changed files with 8 additions and 6 deletions

View File

@ -78,7 +78,7 @@ export function AdminTransactions(props) {
<Form onSubmit={handleSubmit}> <Form onSubmit={handleSubmit}>
<Header size='small'>Add a Transaction</Header> <Header size='small'>Add a Transaction</Header>
<TransactionEditor input={input} setInput={setInput} error={error} /> <TransactionEditor noMemberSearch input={input} setInput={setInput} error={error} />
<Form.Button loading={loading} error={error.non_field_errors}> <Form.Button loading={loading} error={error.non_field_errors}>
Submit Submit

View File

@ -31,8 +31,6 @@ export function MembersDropdown(props) {
image: { avatar: true, src: x.member.photo_small ? staticUrl + '/' + x.member.photo_small : '/nophoto.png' }, image: { avatar: true, src: x.member.photo_small ? staticUrl + '/' + x.member.photo_small : '/nophoto.png' },
})); }));
console.log(value, initial);
return ( return (
<Dropdown <Dropdown
clearable clearable

View File

@ -7,7 +7,7 @@ import { isAdmin, BasicTable, requester } from './utils.js';
import { NotFound, PleaseLogin } from './Misc.js'; import { NotFound, PleaseLogin } from './Misc.js';
export function TransactionEditor(props) { export function TransactionEditor(props) {
const { token, input, setInput, error } = props; const { token, input, setInput, error, noMemberSearch } = props;
const handleValues = (e, v) => setInput({ ...input, [v.name]: v.value }); const handleValues = (e, v) => setInput({ ...input, [v.name]: v.value });
const handleUpload = (e, v) => setInput({ ...input, [v.name]: e.target.files[0] }); const handleUpload = (e, v) => setInput({ ...input, [v.name]: e.target.files[0] });
@ -61,7 +61,7 @@ export function TransactionEditor(props) {
return ( return (
<div className='transaction-editor'> <div className='transaction-editor'>
<Form.Field error={error.member_id}> {!noMemberSearch &&<Form.Field error={error.member_id}>
<label>Member (search)</label> <label>Member (search)</label>
<MembersDropdown <MembersDropdown
token={token} token={token}
@ -69,7 +69,7 @@ export function TransactionEditor(props) {
onChange={handleValues} onChange={handleValues}
initial={input.member_name} initial={input.member_name}
/> />
</Form.Field> </Form.Field>}
<Form.Group widths='equal'> <Form.Group widths='equal'>
<Form.Input <Form.Input

View File

@ -39,6 +39,10 @@ body {
padding-top: 1rem; padding-top: 1rem;
} }
.topPadding > .ui.container{
min-height: 45rem;
}
.photo-small { .photo-small {
max-width: 80px; max-width: 80px;
max-height: 80px; max-height: 80px;