gd-bs 6.0.8 → 6.1.0

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.1.0",
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
@@ -101,6 +101,9 @@ export interface INavbar {
101
101
  /** The element. */
102
102
  el: HTMLBaseElement;
103
103
 
104
+ /** Method to get the search box value. */
105
+ getSearchValue?: () => string;
106
+
104
107
  /** Hides the nav bar. */
105
108
  hide: () => void;
106
109