How to enable search in `Gtk.DropDown`?


I want to enable search in Gtk.DropDown:

//  test.js = "4.0";
const { Gtk, GObject } =;

var ExampleApp = GObject.registerClass(
class ExampleApp extends Gtk.Application {
    vfunc_activate() {
        let appWindow = new Gtk.ApplicationWindow({ application: this });
        let drop = Gtk.DropDown.new_from_strings(Array.from({ length: 30 }, (v, i) => 'opt' + i));

        appWindow.set_default_size(200, 200);
new ExampleApp().run([imports.system.programInvocationName].concat(ARGV));

There should be only one item opt3 left when searching in the box, but nothing happens. It should work for the Gtk.StringList model even without set_expression as promised. If not, how can I do that? Thanks in advance!

The promise has an exception, here:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.