Open green2k opened 7 years ago
You can do inputProps={ readOnly: true }
instead, I think this PR is just a syntactic sugar.
This PR actually adds the readOnly
property into the SimpleSelect & MultiSelect components, so we can properly use it. If there's already some other options about how to mark the input element as read only, then it's maybe missing in the API documentation. However, I've migrated to react-select
a couple of days ago, so this issue can be closed :slightly_smiling_face:
@elisherer inputProps
is a valid property? doesn't seems to exists in SimpleSelect though.
@elisherer I see... cause I couldn't find it here. and my tslint is being annoying. any idea why? sorry for the trouble though 😢
update: oh you guys forget to update this file? 😄 https://github.com/furqanZafar/react-selectize/blob/master/src/index.d.ts
You're right, the inputProperty
property is not valid, as it's not specified in the type definition.
@green2k I just need to add the type definition into this file then it should work? send a PR? https://github.com/furqanZafar/react-selectize/blob/master/src/index.d.ts sorry im kinda new with ts and oss stuff 😅
Using this new property, we can set the component as
readOnly
, so no custom text-input will be allowed.