79332199

Date: 2025-01-06 06:05:19
Score: 1
Natty:
Report link

Issue is getting due to using same formSelector and ngSubmit directive. just keep them different. issue w

    <form (ngSubmit)="generateReport()" #generateBasicReport="ngForm"
      class="form-margin grid grid-cols-1 sm:grid-cols-2 gap-4">

      <div class="text-xs searchable-dropdown fleetiq-input-container">
        <label for="city" class="fleetiq-input-label text-xs z-1">City</label>
        <ng-select [items]="exporters" bindLabel="name" bindValue="exporter" [(ngModel)]="report_name"
          [searchable]="true" (change)="selectReportType($event)" [ngModelOptions]="{standalone: true}" appendTo="body"
          dropdownPosition="auto">
        </ng-select>
      </div>

      <button [disabled]="!generateBasicReport.form.valid" type="submit"
        class="w-full px-4 py-2 text-white bg-blue-500 hover:bg-blue-600 rounded-md">
        Generate Report
      </button>


    </form>

enter image description here

Reasons:
  • Blacklisted phrase (1): enter image description here
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ajaz Beig