Skip to content

Commit

Permalink
chore: disable filter schedule button if all rows do not have sourceS…
Browse files Browse the repository at this point in the history
…chedule

Signed-off-by: andy.lee <[email protected]>
(cherry picked from commit e6dfe0e)
  • Loading branch information
a110605 authored and mergify[bot] committed Jan 13, 2025
1 parent 44b8e44 commit 77faff1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/harvester/components/FilterVMSchedule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export default {
return Array.from(new Set(options));
},
enableButton() {
return this.rows.some(r => r.sourceSchedule !== undefined);
}
},
methods: {
Expand Down Expand Up @@ -73,7 +76,7 @@ export default {
placement="bottom-end"
>
<slot name="header">
<button ref="actionDropDown" class="btn bg-primary mr-10">
<button ref="actionDropDown" class="btn bg-primary mr-10" :disabled="!enableButton">
<slot name="title">
{{ t('harvester.fields.filterSchedule') }}
</slot>
Expand Down

0 comments on commit 77faff1

Please sign in to comment.