Comments (4)
It is the expected behaviour
disabled: user can't write and the input shows up disabled (see disabled
demo)
readOnly: user can't write but the input looks active, used by one of our select variants, in which the user can't write to choose its option (see with placeholder
demo)
from sui-components.
In the case of molecule/select, the readOnly is implicit so the input will be disabled and its value will be ignored when submitted. I also found that is not possible to set a name to it. Should I use a hidden input that stores the atom/select value?
from sui-components.
Hi @juanmendez90, I answer you below...
the readOnly is implicit so the input will be disabled and its value will be ignored when submitted.
The MoleculeSelect
component is not really a select
but a div
that emulates a select
behaviour. That's why the value of the select
should be captured from a higher component that manages the state of the component (or the general state of the form). For that, there's a onChange
prop that can be used to pass a handler that will be triggered on every value change (receiving that value)
I also found that is not possible to set a name to it
For that same reason (The MoleculeSelect
component is not really a select
but a div
that emulates a select
behaviour.) you cannot set a name
for this component. And also for the same reason ( the value of the select
should be captured from a higher component that manages the state of the component ) you shouldn't need to set a name
in this component, because the submit of the form should be handled programmatically by the higher component that manages the state of the whole form
from sui-components.
Ok got it, I will close the issue then, thanks for your answers
from sui-components.
Related Issues (20)
- 🎨 molecule/radioButtonGroup
- 🎨 Molecule/Autosuggest
- ✨Atom/ValidationText admit nodes al label
- ✨Atom/HelpText admit nodes al label
- ✨Molecule/Field label nodes adaption
- ✨Atom/Popover add icon color type
- 🧱 hook/usePortal
- 🎨 Atom Slider add doc marker prop
- 🪲 Molecule Field label iteration is not right
- ✨Atom image update proptype
- 🪲 arrow border color inherit from custom type
- 🪲 molecule/radioButtonGroup props not being passed
- onBlur is not executed after typing some text🪲
- ✨ [Select] Add a Prop to disable keyboard opening by default
- ✨ [Select Popover] Allow controlling the position of the Popover Box
- ✨[Molecule/Carousel]: arrows are not left/right exact anchored
- Can not delete a tag in multiselection AutosuggestField🪲
- Improve checking of buttons props on MoleculeNotification ✨
- Failing tests in molecules autosuggest & carousel skipped 🧪 HOT 1
- atom/toast:The toast does not close🪲
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 sui-components.