mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-14 17:18:33 +00:00
Merge branch 'tiny-user-management-fixes' into 'develop'
Small admin user management improvements See merge request baserow/baserow!2553
This commit is contained in:
commit
4853e1c2d1
4 changed files with 15 additions and 12 deletions
changelog/entries/unreleased/feature
premium/backend/src/baserow_premium/api/admin/users
web-frontend/modules/core/components/crudTable
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "feature",
|
||||
"message": "User admin: search for id, prevent unnecessary refresh, and add scrollbar expand list context",
|
||||
"issue_number": null,
|
||||
"bullet_points": [],
|
||||
"created_at": "2024-07-16"
|
||||
}
|
|
@ -44,7 +44,7 @@ User = get_user_model()
|
|||
|
||||
class UsersAdminView(AdminListingView):
|
||||
serializer_class = UserAdminResponseSerializer
|
||||
search_fields = ["username"]
|
||||
search_fields = ["id", "username", "first_name"]
|
||||
sort_field_mapping = {
|
||||
"id": "id",
|
||||
"is_active": "is_active",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
:placeholder="$t('crudTableSearch.search')"
|
||||
icon-left="iconoir-search"
|
||||
:loading="loading"
|
||||
@keyup="searchIfChanged(headerSearchTerm, false)"
|
||||
@input="doSearch($event, false)"
|
||||
>
|
||||
</FormInput>
|
||||
</form>
|
||||
|
@ -36,7 +36,6 @@ export default {
|
|||
},
|
||||
data: () => {
|
||||
return {
|
||||
lastSearch: '',
|
||||
headerSearchTerm: '',
|
||||
searchDebounce: null,
|
||||
}
|
||||
|
@ -52,6 +51,11 @@ export default {
|
|||
this.$priorityBus.$off('start-search', this.searchStarted)
|
||||
},
|
||||
methods: {
|
||||
keydown(event) {
|
||||
if (event.key !== 'Enter') {
|
||||
this.doSearch(this.headerSearchTerm, false)
|
||||
}
|
||||
},
|
||||
searchStarted({ event }) {
|
||||
event.preventDefault()
|
||||
this.$bus.$emit('close-modals')
|
||||
|
@ -71,14 +75,6 @@ export default {
|
|||
this.searchDebounce()
|
||||
}
|
||||
},
|
||||
searchIfChanged(query, immediate = false) {
|
||||
if (this.lastSearch === query) {
|
||||
return
|
||||
}
|
||||
|
||||
this.lastSearch = query
|
||||
this.doSearch(query, immediate)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<Context>
|
||||
<Context :overflow-scroll="true" :max-height-if-outside-viewport="true">
|
||||
<ul class="context__menu">
|
||||
<li
|
||||
v-for="value in hiddenRecords"
|
||||
|
|
Loading…
Add table
Reference in a new issue