gd-bs 6.0.8 → 6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "6.0.8",
3
+ "version": "6.0.9",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -276,6 +276,19 @@ class _Navbar extends Base<INavbarProps> implements INavbar {
276
276
  * Public Methods
277
277
  */
278
278
 
279
+ // Returns the current search value
280
+ getSearchValue() {
281
+ // Get the searchbox element
282
+ let searchbox = this.el.querySelector("form input") as HTMLInputElement;
283
+ if (searchbox) {
284
+ // Return the value
285
+ return searchbox.value;
286
+ }
287
+
288
+ // Return nothing by default
289
+ return "";
290
+ }
291
+
279
292
  // Updates the navbar template type
280
293
  setType(navbarType: number) {
281
294
  // Remove the classes
@@ -168,6 +168,7 @@ export type INavbarTypes = {
168
168
  export interface INavbarSearchBox {
169
169
  btnType?: number;
170
170
  btnText?: string;
171
+ getSearchValue?: () => string;
171
172
  hideButton?: boolean;
172
173
  onChange?: (value?: string, ev?: Event) => void;
173
174
  onSearch?: (value?: string, ev?: Event) => void;