react-selectize
react-selectize copied to clipboard
Feat: New `readOnly` property in the component's API
Using this new property, we can set the component as readOnly
, so no custom text-input will be allowed.
Coverage remained the same at 88.316% when pulling f877909f2e5d828c09f6ebc68f6a72d57cb65d87 on green2k:property-readOnly into d3f707235cf4f8fca3646421861688678f70f045 on furqanZafar:master.
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.
@joevo2 , it does: https://github.com/furqanZafar/react-selectize/blob/d3f707235cf4f8fca3646421861688678f70f045/src/SimpleSelect.ls#L81
@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 😅