Browse code

Add tom select npm package

Benjamin Roth authored on02/02/2023 12:00:30
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,32 @@
1
+/**
2
+* Tom Select v2.2.2
3
+* Licensed under the Apache License, Version 2.0 (the "License");
4
+*/
5
+
6
+/**
7
+ * Plugin: "input_autogrow" (Tom Select)
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
10
+ * file except in compliance with the License. You may obtain a copy of the License at:
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software distributed under
14
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
15
+ * ANY KIND, either express or implied. See the License for the specific language
16
+ * governing permissions and limitations under the License.
17
+ *
18
+ */
19
+function plugin () {
20
+  var self = this;
21
+  var orig_deleteSelection = self.deleteSelection;
22
+  this.hook('instead', 'deleteSelection', evt => {
23
+    if (self.activeItems.length) {
24
+      return orig_deleteSelection.call(self, evt);
25
+    }
26
+
27
+    return false;
28
+  });
29
+}
30
+
31
+export { plugin as default };
32
+//# sourceMappingURL=plugin.js.map