fix(frontend): チャンネル内の検索ボックスが挙動不審な問題を修正

Fix #10793
This commit is contained in:
syuilo
2023-05-11 16:29:34 +09:00
parent 177359689e
commit df924d18f1
2 changed files with 6 additions and 2 deletions

View File

@@ -46,7 +46,7 @@
</MkInput>
<MkButton primary rounded style="margin-top: 8px;" @click="search()">{{ i18n.ts.search }}</MkButton>
</div>
<MkNotes v-if="searchPagination" :key="searchQuery" :pagination="searchPagination"/>
<MkNotes v-if="searchPagination" :key="searchKey" :pagination="searchPagination"/>
</div>
</div>
</MkSpacer>
@@ -93,6 +93,7 @@ let channel = $ref(null);
let favorited = $ref(false);
let searchQuery = $ref('');
let searchPagination = $ref();
let searchKey = $ref('');
const featuredPagination = $computed(() => ({
endpoint: 'notes/featured' as const,
limit: 10,
@@ -149,10 +150,12 @@ async function search() {
endpoint: 'notes/search',
limit: 10,
params: {
query: searchQuery,
query: query,
channelId: channel.id,
},
};
searchKey = query;
}
const headerActions = $computed(() => {