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

Feat: New `readOnly` property in the component's API

Open green2k opened this issue 7 years ago • 8 comments

Using this new property, we can set the component as readOnly, so no custom text-input will be allowed.

green2k avatar Sep 16 '17 00:09 green2k

Coverage Status

Coverage remained the same at 88.316% when pulling f877909f2e5d828c09f6ebc68f6a72d57cb65d87 on green2k:property-readOnly into d3f707235cf4f8fca3646421861688678f70f045 on furqanZafar:master.

coveralls avatar Sep 16 '17 00:09 coveralls

You can do inputProps={ readOnly: true } instead, I think this PR is just a syntactic sugar.

elisherer avatar Oct 08 '17 05:10 elisherer

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:

green2k avatar Oct 08 '17 07:10 green2k

@elisherer inputProps is a valid property? doesn't seems to exists in SimpleSelect though.

joevo2 avatar Oct 23 '17 07:10 joevo2

@joevo2 , it does: https://github.com/furqanZafar/react-selectize/blob/d3f707235cf4f8fca3646421861688678f70f045/src/SimpleSelect.ls#L81

elisherer avatar Oct 23 '17 08:10 elisherer

@elisherer I see... cause I couldn't find it here. and my tslint is being annoying. any idea why? sorry for the trouble though 😢 screen shot 2017-10-23 at 4 03 51 pm

update: oh you guys forget to update this file? 😄 https://github.com/furqanZafar/react-selectize/blob/master/src/index.d.ts

joevo2 avatar Oct 23 '17 08:10 joevo2

You're right, the inputProperty property is not valid, as it's not specified in the type definition.

green2k avatar Oct 23 '17 16:10 green2k

@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 😅

joevo2 avatar Oct 24 '17 02:10 joevo2