ui: fix api type in InfiniteScrollSelect (#11370)

Earlier it was always using HTTP POST. Ideally it will always be some
list API.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2025-08-01 17:39:50 +05:30 committed by GitHub
parent a60c8cab14
commit b479d37b87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -88,7 +88,7 @@
</template> </template>
<script> <script>
import { getAPI } from '@/api' import { callAPI } from '@/api/index'
import ResourceIcon from '@/components/view/ResourceIcon' import ResourceIcon from '@/components/view/ResourceIcon'
export default { export default {
@ -191,7 +191,7 @@ export default {
if (this.showIcon) { if (this.showIcon) {
params.showicon = true params.showicon = true
} }
getAPI(this.api, params).then(json => { callAPI(this.api, params).then(json => {
const response = json[this.api.toLowerCase() + 'response'] || {} const response = json[this.api.toLowerCase() + 'response'] || {}
if (this.totalCount === null) { if (this.totalCount === null) {
this.totalCount = response.count || 0 this.totalCount = response.count || 0