-
Notifications
You must be signed in to change notification settings - Fork 58
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
Feature: Combine WfsSearch and WfsSearchInput to WfsSearchField using useWfs
hook
#3771
Conversation
BREAKING CHANGE: make use of new useWfs hook in react-util Co-authored-by: Amanda Sefu-Beierl <[email protected]>
BREAKGING CHANGE: WfsSearch and WfsSearchInput are replaced by WfsSearchField
useWfs
hook
* @class WfsSearchField | ||
* @extends React.Component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(very minor) I think these annotations are meant for class components. I would just remove them since we use typescript anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @class WfsSearchField | |
* @extends React.Component |
loading ? | ||
<FontAwesomeIcon | ||
spin={true} | ||
icon={faCircleNotch} | ||
onClick={resetSearch} | ||
/> : | ||
<FontAwesomeIcon | ||
icon={faClose} | ||
onClick={resetSearch} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loading ? | |
<FontAwesomeIcon | |
spin={true} | |
icon={faCircleNotch} | |
onClick={resetSearch} | |
/> : | |
<FontAwesomeIcon | |
icon={faClose} | |
onClick={resetSearch} | |
/> | |
<FontAwesomeIcon | |
spin={loading} | |
icon={loading ? faCircleNotch : faClose} | |
onClick={resetSearch} | |
/> |
This PR refactors the
WfsSearch
andWfsSearchInput
components to aWfsSearchField
component thatuseWfs
hoom introduced in Feature: introduce useWfs hook react-util#612AutoComplete
orInput
ofantd
) an be changes by settingasInput
prop (default:false
=>AutoComplete
will be rendered.)onChange
andvalue
are overwritten such that they can now be used more easily in antd formsBREAKING CHANGES:
useWfs
hookWfsSearch
andWfsSearchInput
(both removed)) toWfsSearchField
Description
Related issues or pull requests
Pull request type
Do you introduce a breaking change?
Checklist
BSD-2-Clause.
npm test
locally).