# Allow \`Picker\` to be headless \(\#9099\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/7512c9949ccba45bd91710c295b0d92470422784)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 7512c9949ccba45bd91710c295b0d92470422784

Requested commit: 7512c9949ccba45bd91710c295b0d92470422784

Commit: 7512c9949ccba45bd91710c295b0d92470422784

Tree: 20e97dd431f1aedecc3c0909d74549c495e17893

Author: Andrew Lygin

Committer: GitHub

## Message

```
Allow `Picker` to be headless (#9099)

At the moment, `Picker` always has an editor at the top, that allows the
user to search list elements by text. Sometimes, the UI doesn't need
such an editor. Like in the [tab
switcher](https://github.com/zed-industries/zed/issues/7653) that will
confirm selection on the modifier keys release, so there will be no
searching capabilities.

This PR adds support for a "headless picker" that doesn't display an
editor. It only has an invisible element to hold input focus for
preventing it from jumping back to the workspace.

At the moment, none of the picker implementations is made headless. It's
for the future implementations. But I'd like to make it a separate PR to
keep it focused on this particular feature.

Release Notes:

- N/A

Related Issues:
- Part of #7653

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
```

## Parents

- [ad97c357a5f9fca1de1cb1b2743e9f7fe6252d50](https://git.cafe/gitcafe/zed/commit/ad97c357a5f9fca1de1cb1b2743e9f7fe6252d50?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/7512c9949ccba45bd91710c295b0d92470422784?format=markdown)
