sag_components 1.0.776 → 1.0.777

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,19 +46,23 @@ const FilterPanel = props => {
46
46
  setFieldsContainerWidth(offsetWidth - 20);
47
47
  }, [width]);
48
48
  (0, _react.useEffect)(() => {
49
- const newFieldsDataState = FieldsDataState.map(itemFieldsDataState => {
50
- const foundItem = fieldsData.find(itemfieldsData => itemFieldsDataState.name === itemfieldsData.name);
51
- return {
52
- ...itemFieldsDataState,
53
- ...(itemFieldsDataState.dropdownOptions ? {
54
- dropdownOptions: foundItem !== null && foundItem !== void 0 && foundItem.dropdownOptions ? foundItem === null || foundItem === void 0 ? void 0 : foundItem.dropdownOptions : undefined
55
- } : ''),
56
- ...{
57
- disabled: (foundItem === null || foundItem === void 0 ? void 0 : foundItem.disabled) || false
58
- }
59
- };
60
- });
61
- setFieldsDataState(newFieldsDataState);
49
+ if (useExternalFilterState) {
50
+ setFieldsDataState(fieldsData);
51
+ } else {
52
+ const newFieldsDataState = FieldsDataState.map(itemFieldsDataState => {
53
+ const foundItem = fieldsData.find(itemfieldsData => itemFieldsDataState.name === itemfieldsData.name);
54
+ return {
55
+ ...itemFieldsDataState,
56
+ ...(itemFieldsDataState.dropdownOptions ? {
57
+ dropdownOptions: foundItem !== null && foundItem !== void 0 && foundItem.dropdownOptions ? foundItem === null || foundItem === void 0 ? void 0 : foundItem.dropdownOptions : undefined
58
+ } : ''),
59
+ ...{
60
+ disabled: (foundItem === null || foundItem === void 0 ? void 0 : foundItem.disabled) || false
61
+ }
62
+ };
63
+ });
64
+ setFieldsDataState(newFieldsDataState);
65
+ }
62
66
  }, [fieldsData]);
63
67
  const onChangeDropdownMultiHandler = (eventDropdownMulti, item) => {
64
68
  var _eventDropdownMulti$n;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.776",
3
+ "version": "1.0.777",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {