Comments (10)
Здравствуйте.
Если я правильно понял вопрос и пропсы нужно поднять непосредственно во вложенный в компонент input, то нет, сейчас так не работает, туда пробрасываются только некоторые пропсы из родительского компонента.
from react-dadata-suggestions.
Скажите, пожалуйста, а можно ли как-то передать фокус для input?
Мы используем библиотеку final-form-focus
, которая передаёт фокус первому полю с ошибкой при попытке отправить форму. Здесь можно посмотреть пример https://codesandbox.io/s/focus-on-error-wreact-dadata-suggestions-test-7isln?fontsize=14.
Там три вида инпутов: обычное поле (Number), компонент react-select
и компонент react-dadata-suggestions
. Обычное поле сразу получает фокус, компонент react-select
через реф. А в компоненте react-dadata-suggestions
получается передать фокус только внешнему div.
from react-dadata-suggestions.
Добрый день. Скажите, пожалуйста, есть ли у вас какая-то информация по этому вопросу?
from react-dadata-suggestions.
см. v1.3.1
песочница
Добавил возможность передать в компонент пропс name
, он пробросится прямо в input
, и в таком варианте react-form-focus работает из коробки, в смысле со стандартным декоратором.
Пробовал пробрасывать в input
все ненужные самому компоненту пропсы, но так совсем не работает, туда пробрасывается много всего лишнего.
from react-dadata-suggestions.
Вроде всё отлично! name
достаточно, большое спасибо!
from react-dadata-suggestions.
Добрый день.
Не могли бы вы ещё добавить для input
autocomplete="off"
? Раньше автозаполнения вроде не было, а сейчас появилось(
from react-dadata-suggestions.
добавил, скачайте 1.3.2
это видимо какие-то приколы от html5, скорее всего автокомплит для безымянных инпутов не работает, поэтому раньше не было )
from react-dadata-suggestions.
Да, теперь всё ок) Большое спасибо!
from react-dadata-suggestions.
@iloveip обновите пожалуйста библиотеку, там небольшой фикс
см #38
from react-dadata-suggestions.
Ок, большое спасибо)
from react-dadata-suggestions.
Related Issues (20)
- Возможность отключить suggestions HOT 1
- Не работают touch ивенты HOT 2
- Why `dist` directory is not in repo? HOT 2
- breaking changes в версии 1.0.3
- Using react-dadata-suggestions with Formik or react-final-form HOT 19
- Add a class name to the query input HOT 4
- Get location data HOT 1
- Problem with extracting onFocus event HOT 4
- How to add styles for suggestion highlighting HOT 4
- Styles for LIQUIDATED are not working HOT 5
- Initializing react-dadata-suggestions with data from the state HOT 24
- Выпадалка в body HOT 2
- Возможность указать приоритет города HOT 2
- Warning: Invalid DOM property `autocomplete`. Did you mean `autoComplete`? HOT 1
- Как передать атрибут id компоненту HOT 3
- Поддержка подсказок по ФИАС HOT 1
- `bounds` prop HOT 2
- Проблемы с определением ОКТМО для адресов в Санкт-Петербурге HOT 6
- Как связать эту библиотеку с useForm? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-dadata-suggestions.