Skip to content

Commit

Permalink
chore: update docs #2170
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-mihok committed Nov 16, 2023
1 parent 1f4b452 commit 6007fac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ui/src/textbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const
suffix: m.suffix,
multiline: m.multiline,
spellCheck: m.spellcheck,
type: m.password ? 'password' : (m.keyboard || 'text'),
type: m.password ? 'password' : (m.type || 'text'),
}

React.useEffect(() => {
Expand Down
6 changes: 3 additions & 3 deletions website/widgets/form/textbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ q.page['example'] = ui.form_card(

## Mobile keyboard layout

Show proper keyboard layout on mobile devices with `keyboard` attribute. Defaults to `text`.
This does not prevent user from typing any character. If you want to allow typing e.g. numeric characters only, use in combination with [mask](#with-mask).
Show proper keyboard layout on mobile devices with `type` attribute. Defaults to `text`.
This does not prevent user from typing any character.

```py
q.page['example'] = ui.form_card(
Expand All @@ -155,7 +155,7 @@ q.page['example'] = ui.form_card(
),
ui.textbox(
name='textbox_keyboard_telephone',
label='With numeric keyboard (iOS, Android)',
label='With numeric keyboard (iOS, Android)',
# Show telephone keyboard
type='tel'
)
Expand Down

0 comments on commit 6007fac

Please sign in to comment.