3.0.2 • Published 1 year ago

@statewalker/store-ui v3.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@statewalker/store-ui: UI binding for Stores

This module provides binding between Stores (@statewalker/store) and DOM elements.

Methods:

  • extendInputStore(store) - the main method of this library; it binds two additional store methods:
    • store.bindView(view, keys, action) - binds the given view DOM object to store values corresponding to the given keys; if the view is not defined then a new div element is created; it uses internally the bindStoreView(..) method described below
    • store.bindStoreInput(key, configKey, input) - binds the store values corresponding to the key parameter to input instances returned by the input function; if the configKey parameter is defined then the input is called each time when these dependencies are changed
  • bindStoreView(store, view, keys, action) - bind a view (a DOM element) to the store; the specified action allows to update the view each time when some fields (defined by the keys parameters) change its value.
  • bindStoreInput(store, key, input) - synchronizes the given input to the store field defined by the key parameter; an input is a DOM element with the value property and rising the "input" event when user updates values; see the ObservableHQ inputs library (GitHub) for more information.
  • bindConfigurableStoreInput(store, configKey, valueKey, input) - binds input values to a specific field of the store defined by the valueKey parameter; the input function should return a new input instance and it is called each time when the configKey field of the store changes its values

Used libraries in GitHub:

For working examples see this Observable Notebook:

3.0.2

1 year ago

2.0.3

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.0

2 years ago