code: public function handle(GetPropertyOptionsEvent $event)
      {
          if (('tl_metamodel_filtersetting' !== $event->getEnvironment()->getDataDefinition()->getName())
              || ('defaultid' !== $event->getPropertyName())) {
              return;
          }
  
          $model = $event->getModel();
          if (!($attributeId = $model->getProperty('attr_id'))) {
              return;
          }
          if (null === $metaModel = $this->filterFactory->createCollection($model->getProperty('fid'))->getMetaModel()) {
              return;
          }
  
          if (null === $attribute = $metaModel->getAttributeById($attributeId)) {
              return;
          }
  
          $event->setOptions($this->getOptions($attribute, $model->getProperty('onlyused') ? true : false));
      }
docs: Provide options for default selection.
  
  @param GetPropertyOptionsEvent $event The event.
  
  @return void