score:4

<Autocomplete
    id="supplierIdd"
    style={{ width: 300 }}
    options={suppliers.map((supplier) => supplier.name)}
    renderInput={(params) => 
      <>
        <TextField {...params} label="Булстат" margin="normal" onClick={()=>{console.log("hi")}} variant="outlined" />
      </>
    }
    filterOptions={(options) => {
          const result = [...options]
          result.push(
            ((
              <Button
                variant="outlined"
                color="primary"
                onMouseDown={onAddNew}
              >
               + Add New
              </Button>
            ) as unknown) as string,  // typecasting required for typescript
          )

          return result
        }}

      />

Related Query

More Query from same tag