-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate js binding to watch methods (#190)
* Dependencies update * Extend configuration by adding custom fields configuration
- Loading branch information
Showing
20 changed files
with
10,485 additions
and
4,906 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Config, OutputFields } from "@ideal-postcodes/jsutil"; | ||
|
||
import { setupAutocomplete, setupPostcodeLookup } from "./extension"; | ||
|
||
export const pageTest = () => true; | ||
|
||
interface CustomConfig extends Config { | ||
customFields?: OutputFields[] | ||
} | ||
|
||
const bind = (config: CustomConfig) => { | ||
const selectors = config.customFields || []; | ||
selectors.forEach((selectors: OutputFields) => { | ||
setupAutocomplete(config, selectors, pageTest); | ||
setupPostcodeLookup(config, selectors, pageTest); | ||
}); | ||
}; | ||
|
||
export const bindings = { bind }; |
Oops, something went wrong.