@iankibetsh/shframework 3.0.8 → 3.0.9

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.
package/dist/library.js CHANGED
@@ -2094,18 +2094,19 @@ function filterData(e){
2094
2094
  }
2095
2095
  let filterValue = e.target.innerText;
2096
2096
  searchText.value = filterValue;
2097
- if(props.data) {
2097
+ console.log(props);
2098
+ if (props.url) {
2099
+ shApis.doGet(props.url, { all: 1,filter_value: filterValue }).then(res => {
2100
+ suggestions.value = res.data.data ?? res.data;
2101
+ }).catch(res => {
2102
+ console.log(res);
2103
+ });
2104
+ } else if(props.data) {
2098
2105
  suggestions.value = props.data.filter(item=>{
2099
2106
  if(item.name.toLowerCase().includes(filterValue.toLowerCase())){
2100
2107
  return item
2101
2108
  }
2102
2109
  });
2103
- } else if (props.url) {
2104
- shApis.doGet(props.url, { all: 1,filter_value: filterValue }).then(res => {
2105
- suggestions.value = res.data.data ?? res.data;
2106
- }).catch(res => {
2107
- console.log(res);
2108
- });
2109
2110
  }
2110
2111
  }
2111
2112
 
@@ -2136,6 +2137,7 @@ return (_ctx, _cache) => {
2136
2137
  contenteditable: "true",
2137
2138
  onClick: filterData,
2138
2139
  onInput: filterData,
2140
+ onChange: filterData,
2139
2141
  class: "flex-fill h-100 sh-suggestion-input"
2140
2142
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$9)
2141
2143
  ], 8 /* PROPS */, _hoisted_2$d),
package/dist/library.mjs CHANGED
@@ -2082,18 +2082,19 @@ function filterData(e){
2082
2082
  }
2083
2083
  let filterValue = e.target.innerText;
2084
2084
  searchText.value = filterValue;
2085
- if(props.data) {
2085
+ console.log(props);
2086
+ if (props.url) {
2087
+ shApis.doGet(props.url, { all: 1,filter_value: filterValue }).then(res => {
2088
+ suggestions.value = res.data.data ?? res.data;
2089
+ }).catch(res => {
2090
+ console.log(res);
2091
+ });
2092
+ } else if(props.data) {
2086
2093
  suggestions.value = props.data.filter(item=>{
2087
2094
  if(item.name.toLowerCase().includes(filterValue.toLowerCase())){
2088
2095
  return item
2089
2096
  }
2090
2097
  });
2091
- } else if (props.url) {
2092
- shApis.doGet(props.url, { all: 1,filter_value: filterValue }).then(res => {
2093
- suggestions.value = res.data.data ?? res.data;
2094
- }).catch(res => {
2095
- console.log(res);
2096
- });
2097
2098
  }
2098
2099
  }
2099
2100
 
@@ -2124,6 +2125,7 @@ return (_ctx, _cache) => {
2124
2125
  contenteditable: "true",
2125
2126
  onClick: filterData,
2126
2127
  onInput: filterData,
2128
+ onChange: filterData,
2127
2129
  class: "flex-fill h-100 sh-suggestion-input"
2128
2130
  }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5$9)
2129
2131
  ], 8 /* PROPS */, _hoisted_2$d),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "3.0.8",
3
+ "version": "3.0.9",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",