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}>
<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}>
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' },
}));
console.log(value, initial);
return (
<Dropdown
clearable

View File

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

View File

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