Multiple - Make callback APIs consistent #8102
Labels
breaking change 💥
this change requires a major release and has API changes.
enhancement 🚀
Epic
Feature
end user feature that requires design to define this, i.e. changes or augments the user experience.
lg
P1 ⭐
top priority issues
PF5
require codemod
Milestone
Describe the problem
Make callback APIs consistent. All should pass back an event and it should be the first parameter to match industry standards. Open a code mode issue when applicable.
onClose
callback. #8607onOverflowClick
callback. #8608onFavorite
andonSearch
callbacks. it should be first parameter. #8692onChange
callback. Switch order of params foronMonthChange
so event is first. #8693onSelectableInputChange
so event is first. #8694onChange
so event is first. #8697onChange
callback. It should be first parameter. #8698onSearchInputChange
callback, it should be the first parameter. #8718onSelectDataListItem
callback, it should be the first parameter #8719onChange
so that event is first #8720onResize
. it should be first parameter. #8721onToggle
so event is first. #8664onToggle
callback. It should be first parameter. #8880onDataChange
,onReadFailed
,onReadFinished
,onReadStarted
andonTextChange
callbacks. It should be first parameter. #8881onChange
so event is first. Add event param as first parameter ofonTextChange
. #8882onFileDrop
. #8883onReadFail
,onReadFinished
,onReadStarted
andonReadSuccess
callbacks. It should be first parameter. #8884onChange
so event is first. #8885onChangePassword
,onChangeRememberMe
andonChangeUsername
so that event is first. #8886onClose
#8887onSelect
andonToggle
so that event is first. #88882.) Either change the
NavSelectClickHandler
type to an interface and add it to thepropComponents
array in the md file so it is documented OR, define the function definition inline with theonClick
prop definition. Either way, change thee
parameter toevent
for consistency.e
toevent
inonExpand
#8894onClose
#8896onNotificationDrawerExpand
andonPageResize
. It should be first parameter. #8907_evt
toevent
inonPerPageSelect
andonSetPage
#8895onHidden
,onHide
,onMount
,onShow
andonShown
callback. It should be first parameter. #8929shouldClose
andshouldOpen
so that event is first. #9025onChange
so event is first. #8961For consistency change the parameter name from
e
toevent
inonFilter
.onChange
#8963onChange
so event is first. #9022EditableSelectInputCell
, change the order of params inclearSelection
andonSelect
so that the event is first. Also add event param as first param ofonToggle
#9056onToggle
#9058onChange
so event is first. #9060onChange
so event is first. #9062onChange
so event is first. #9066onBack
,onClose
,onCurrentStepChanged
,onGoToStep
,onNext
, and `onSave. It should be first parameter. #9068onNavItemClick
#9070The text was updated successfully, but these errors were encountered: