Repository: wagtail/wagtail
File: client/src/components/ComboBox/ComboBox.tsx (TypeScript)

Code before:
                        className="w-combobox__option"
                      >
                        <div className="w-combobox__option-icon">
                          {icon}
                          {/* Support for rich text options using text as an icon (for example "B" for bold). */}
                          {itemLabel && !hasIcon ? (
                            <span>{itemLabel}</span>
                          ) : null}
                        </div>
                        <div className="w-combobox__option-text">
                          {item.render
                            ? item.render({ option: item })
                            : description}
                        </div>
                      </div>

                      {item.isPreviewable ? (
                        <button
                          className="w-combobox__option-preview"
                          aria-label={comboBoxPreviewLabel}
                          aria-expanded={previewedIndex === itemIndex}
                          type="button"
                          onClick={() =>
                            setPreviewedIndex(
                              previewedIndex === itemIndex
                                ? undefined
                                : itemIndex,
                            )
                          }
                        >
                          <Icon name="view" />
                        </button>
                      ) : null}
                    </div>
                  );
                })}
              </div>
            );
          })}
        </div>
      </div>
      {previewedBlock?.isPreviewable ? (
        <ComboBoxPreview
          item={previewedBlock}
          previewLabel={comboBoxPreviewLabel}
        />
      ) : null}
    </div>
  );
}


Review comment (suggestion):
```suggestion
                                ? -1
```

Code after:
                        className="w-combobox__option"
                      >
                        <div className="w-combobox__option-icon">
                          {icon}
                          {/* Support for rich text options using text as an icon (for example "B" for bold). */}
                          {itemLabel && !hasIcon ? (
                            <span>{itemLabel}</span>
                          ) : null}
                        </div>
                        <div className="w-combobox__option-text">
                          {item.render
                            ? item.render({ option: item })
                            : description}
                        </div>
                      </div>

                      {item.isPreviewable ? (
                        <button
                          className="w-combobox__option-preview"
                          aria-label={comboBoxPreviewLabel}
                          aria-expanded={previewedIndex === itemIndex}
                          type="button"
                          onClick={() =>
                            setPreviewedIndex(
                              previewedIndex === itemIndex ? -1 : itemIndex,
                            )
                          }
                        >
                          <Icon name="view" />
                        </button>
                      ) : null}
                    </div>
                  );
                })}
              </div>
            );
          })}
        </div>
      </div>
      {previewedBlock?.isPreviewable ? (
        <ComboBoxPreview
          item={previewedBlock}
          previewLabel={comboBoxPreviewLabel}
        />
      ) : null}
    </div>
  );
}