Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Jan 30, 2022
1 parent 27ec3cf commit 2244c6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ This component should have a variable size in the layout to be displayed properl
|--------------|--------------------|----------------------------------------------------------------|
| `Move(Down)` | `Changed` | `None` | Move select down, if tab is open |
| `Move(Up)` | `Changed` | `None` | Move select up, if tab is open |
| `Cancel` | `Changed` | The tab is closed and the value set before opening the tab is restored |
| `Submit` | `Submit` | `None` | Open or close the select tab; Returns state if tab gets closed |

**State**: the state returned is `One(Usize)` containing the index of the selected item in the radio group. This state is returned only when the select is closed; otherwise `None` is returned
Expand Down
2 changes: 1 addition & 1 deletion src/components/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ impl MockComponent for Select {
}
Cmd::Cancel => {
self.states.cancel_tab();
CmdResult::Submit(self.state())
CmdResult::Changed(self.state())
}
Cmd::Submit => {
// Open or close tab
Expand Down

0 comments on commit 2244c6e

Please sign in to comment.