mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 05:02:24 -06:00
[bugfix/frontend] Fix error on submitting domain perm with enter key (#3218)
This commit is contained in:
parent
889d4756ea
commit
9b2f14b131
2 changed files with 12 additions and 5 deletions
|
|
@ -100,7 +100,7 @@ function DomainPermsList({ data, permType, permTypeUpper }: DomainPermsListProps
|
|||
|
||||
function filterFormSubmit(e) {
|
||||
e.preventDefault();
|
||||
setLocation(`/${filter}`);
|
||||
setLocation(`/${permType}s/${filter}`);
|
||||
}
|
||||
|
||||
const filter = filterField.value ?? "";
|
||||
|
|
@ -136,12 +136,15 @@ function DomainPermsList({ data, permType, permTypeUpper }: DomainPermsListProps
|
|||
placeholder="example.org"
|
||||
label={`Search or add domain ${permType}`}
|
||||
/>
|
||||
<Link
|
||||
className="button"
|
||||
to={`/${permType}s/${filter}`}
|
||||
<button
|
||||
type="submit"
|
||||
disabled={
|
||||
filterField.value === undefined ||
|
||||
filterField.value.length == 0
|
||||
}
|
||||
>
|
||||
{permTypeUpper} {filter}
|
||||
</Link>
|
||||
</button>
|
||||
</form>
|
||||
<div>
|
||||
{filterInfo}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue