Skip to content

Commit 1112d7f

Browse files
committed
SearchBox: read allowAddLayerAsGroup from searchOptions
1 parent 79d6427 commit 1112d7f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/SearchBox.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ class SearchBox extends React.Component {
399399
{result.theme ? (<Icon className="searchbox-result-openicon" icon="open" />) : null}
400400
<span className="searchbox-result-label" dangerouslySetInnerHTML={{__html: DOMPurify.sanitize(result.text).replace(/<br\s*\/>/ig, ' ')}} title={result.label ?? result.text} />
401401
{result.theme && addThemes ? (<Icon icon="plus" onClick={() => this.selectLayerResult(provider, group, result)} title={LocaleUtils.tr("themeswitcher.addtotheme")}/>) : null}
402-
{this.props.allowAddLayerAsGroup && result.sublayers ? (<Icon icon="group" onClick={() => this.selectLayerResult(provider, group, result, true)} title={LocaleUtils.tr("importlayer.asgroup")} />) : null}
402+
{this.props.searchOptions.allowAddLayerAsGroup && result.sublayers ? (<Icon icon="group" onClick={() => this.selectLayerResult(provider, group, result, true)} title={LocaleUtils.tr("importlayer.asgroup")} />) : null}
403403
{result.info ? <Icon icon="info-sign" onClick={(ev) => this.toggleLayerInfo(ev, provider, group, result, key, parent)} /> : null}
404404
</div>
405405
), this.state.activeLayerInfo === key ? (

0 commit comments

Comments
 (0)