# submitOnClose

> Why JS: a picker in a popover saves as a model, once, when the reader is done with it, and only script hears the popover close.

```ts
import { submitOnClose } from "@sdxc/ui/app";
```

Applied to an element inside a form inside a popover: records the form's values each time
the popover opens and, when it closes holding different values, submits the form through
`requestSubmit`, so the app's own submit handling (a frame, a fetch) takes the request.

## Signature

```ts
submitOnClose(): MixinDescriptor<HTMLElement>
```

## Examples

```tsx
<div mix={[submitOnClose()]}>{checkboxes}</div>
```
