mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-25 21:26:40 +00:00
[bugfix/frontend] Fix error on submitting domain perm with enter key (#3218)
This commit is contained in:
parent
889d4756ea
commit
9b2f14b131
|
@ -581,6 +581,10 @@ span.form-info {
|
||||||
.filter {
|
.filter {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
|
|
||||||
|
button {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.entry {
|
.entry {
|
||||||
|
|
|
@ -100,7 +100,7 @@ function DomainPermsList({ data, permType, permTypeUpper }: DomainPermsListProps
|
||||||
|
|
||||||
function filterFormSubmit(e) {
|
function filterFormSubmit(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setLocation(`/${filter}`);
|
setLocation(`/${permType}s/${filter}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const filter = filterField.value ?? "";
|
const filter = filterField.value ?? "";
|
||||||
|
@ -136,12 +136,15 @@ function DomainPermsList({ data, permType, permTypeUpper }: DomainPermsListProps
|
||||||
placeholder="example.org"
|
placeholder="example.org"
|
||||||
label={`Search or add domain ${permType}`}
|
label={`Search or add domain ${permType}`}
|
||||||
/>
|
/>
|
||||||
<Link
|
<button
|
||||||
className="button"
|
type="submit"
|
||||||
to={`/${permType}s/${filter}`}
|
disabled={
|
||||||
|
filterField.value === undefined ||
|
||||||
|
filterField.value.length == 0
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{permTypeUpper} {filter}
|
{permTypeUpper} {filter}
|
||||||
</Link>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<div>
|
<div>
|
||||||
{filterInfo}
|
{filterInfo}
|
||||||
|
|
Loading…
Reference in a new issue