Releases: based-ghost/react-functional-select
Releases · based-ghost/react-functional-select
v2.0.4
Change Log
🛠 Misc
- Remove hook
useIsBrowserMS.tsand replace with function that is called inline in styled-component. Also, now limit the regex to just test for IE (no longer need to test for Edge). data-testidattributes only added in test environment.
v2.0.3
Change Log
🛠 Misc
- Performance optimization. In hook
useMenuOptions.ts- when initializing functiongetFilterOptionString2in the effect - added type check onoption.labeland iftypeof option.label === 'string'just returnoption.labeldirectly and avoid new string allocation every time.option.labelis typed asReactText, so previouslyoption.labelwas wrapped inString()to get consistentstringreturn type for function.
v2.02
Change Log
🐞 Bugfix
- Fixed an IE browser-specific styling issue for
SingleValueandPlaceholderdisplays in theValue.tsxcomponent - was not displaying with correct vertical alignment (all other browsers appeared fine, however.SingleValueandPlaceholderstyled-components received the additionalCSSof:
top: 50%;
transform: translateY(-50%);
v2.0.1
Change Log
🐞 Bugfix
- Custom hook
useUpdateEffect.tsneeds to explicitly return the forwardedeffect()in order to properly execute the cleanup function (if one exists).
🛠 Misc
- Replaced
regex + string.replace()with nativetrim()method in utility functiontrimAndFormatFilterStr. - Bumped
@storybook/react,@storybook/addon-storysource,@storybook/addonspackages to v5.3.0 and update configuration files in directory ".storybook" to utilize the new recommended config setup (usingmain.js,manager.js, andpreview.jsfiles).
v2.0.0
Change Log
🚀 Feature
- Added
cssproperty of typestring|FlattenSimpleInterpolation|undefined(default value is undefined) to various nested objects of thethemeConfigobject. This property can be used to pass raw CSS styles as a string or wrapped in styled-components exportedcssfunction. Those objects are: select, control, icon, menu, noOptions, multiValue, and input.
Note there is a potential breaking change as a result of this update.
theselectobject no longer has thefontSizeproperty, nor is it's color updated by thecolor.textColorproperty. Now, you would need to make an update tothemeConfiglike:
{
select: {
css: 'font-size: 1rem; color: #000;'
}
}
🛠 Misc
- Bump some dev dependencies
- Micro-optimization to store result of testing for IE browser in a
ref(and testing just once, rather than on every render ofAutosizeInput.tsxcomponent). Logic for this abstracted out to new hook:useIsBrowserMS.ts.