Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: New readOnly property in the component's API #173

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/MultiSelect.ls
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ module.exports = class MultiSelect extends React.Component
# props
{
autofocus, autosize, cancel-keyboard-event-on-selection, delimiters, disabled, dropdown-direction, group-id,
groups, groups-as-columns, hide-reset-button, input-props, name, on-keyboard-selection-failed, render-toggle-button,
groups, groups-as-columns, hide-reset-button, input-props, name, on-keyboard-selection-failed, readOnly, render-toggle-button,
render-group-title, render-reset-button, serialize, tether, tether-props, theme, transition-enter, transition-leave,
transition-enter-timeout, transition-leave-timeout, uid
}? = @props
Expand All @@ -97,6 +97,7 @@ module.exports = class MultiSelect extends React.Component
input-props
name
on-keyboard-selection-failed
readOnly
render-group-title
render-reset-button
render-toggle-button
Expand Down
1 change: 1 addition & 0 deletions src/ReactSelectize.ls
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ module.exports = class ReactSelectize extends React.Component
ref: \search
type: \text
value: @props.search
readOnly: @props.readOnly

# update the search text & highlight the first option
on-change: ({current-target:{value}}) ~>
Expand Down
3 changes: 2 additions & 1 deletion src/SimpleSelect.ls
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module.exports = class SimpleSelect extends React.Component
# props
{
autofocus, autosize, cancel-keyboard-event-on-selection, delimiters, disabled, dropdown-direction, group-id,
groups, groups-as-columns, hide-reset-button, name, input-props, on-blur-resets-input, render-toggle-button,
groups, groups-as-columns, hide-reset-button, name, input-props, on-blur-resets-input, readOnly, render-toggle-button,
render-group-title, render-reset-button, serialize, tether, tether-props, theme, transition-enter,
transition-leave, transition-enter-timeout, transition-leave-timeout, uid
}? = @props
Expand All @@ -101,6 +101,7 @@ module.exports = class SimpleSelect extends React.Component
input-props
name
on-blur-resets-input
readOnly
render-group-title
render-reset-button
render-toggle-button
Expand Down