react-admin icon indicating copy to clipboard operation
react-admin copied to clipboard

Label on SearchInput partially hides searched text

Open alixdeschamps opened this issue 6 years ago • 4 comments

What you were expecting: The label from SearchInput should not partially hides the search test

Screenshot from 2020-06-23 16-18-00

Steps to reproduce: Add a label prop to a SearchInput and enter some text in the search field

Related code: Here is a fork from your sandbox, I just added the label prop to the SearchInput https://codesandbox.io/s/admiring-butterfly-zj21v?file=/src/posts/PostList.js

Environment

  • React-admin version: 3.6.1
  • React version: 16.3.1
  • Browser: Chrome and codeSandbox browser

alixdeschamps avatar Jun 23 '20 14:06 alixdeschamps

Reproduced. Thanks for reporting. We should at least automatically add an aria-label on this input.

djhi avatar Jun 24 '20 07:06 djhi

We should just throw an exception if you set a label on the SearchInput. It's not designed to contain a floating label. If you want a floating label, use a TextInput.

fzaninotto avatar Jun 24 '20 13:06 fzaninotto

but, if I need to use an input with ICON, especifically searchIcon, like seachInput has, how can I use with TextInput? because in documentation TextInput can't receive a iconProp!

Raidro avatar Oct 07 '22 14:10 Raidro

@Raidro you might want to have a look at https://mui.com/material-ui/react-text-field/#input-adornments

slax57 avatar Oct 07 '22 16:10 slax57