Open tschneideriii opened 1 year ago
You can either provide your own input template, see the "Corrdinates" input on this demo https://github.com/mistic100/jQuery-QueryBuilder/blob/48e1f09de01862e1bb12d98887b01a12079bd5ed/examples/index.html#L445-L504
Or create you own complete jQuery plugin.
Both solutions are show on the demo https://querybuilder.js.org/demo.html#widgets
I'm looking for either direction on creating a new Plug-in or adding to the core. Like the DatePicker plugin you can change the input, the Popup input would let you click an "Add" link that pop ups a Modal. You would do something in the modal then return the selected value back to the QueryBuilder. You could click the "Add" button multiple times to add multiple items.
For example, when selecting the PopUp plugin, you'd see a 'Add' link:![image](https://user-images.githubusercontent.com/31141170/200982915-0f84271b-f2e6-4d1c-acb1-55245bc95719.png)
Clicking the "Add" link, I'd see a Modal, where I could do some Ajax search. In this example, I'm searching for Blue colors. I would click on the + sign to close the Modal and add my selection would go to the Query builder![image](https://user-images.githubusercontent.com/31141170/200982803-d0989522-b00d-4ff2-9088-5b0449509c23.png)
This would be after I clicked on the plus sign next to Blue, It would show that I've selected Blue and Yellow with the option of removing them with the X.![image](https://user-images.githubusercontent.com/31141170/200980640-b5206f61-3f35-4869-9d2e-59aac36a879a.png)
I hope this example explains what I'm looking do add to your plugin.