I'm creating an extension that replaces the default configurable options label 'Choose an Option...' with the attribute name, for example 'Choose a Color...'.
How can I extend (not override!) the jQuery widget configurable.js and only modify this line?
I know from the documentation that I can override a jQuery widget, so I did:
define([
'jquery',
'jquery/ui',
'configurable' // usually widget can be found in /lib/web/mage dir
], function($){
$.widget('silvan.configurable', $.mage.configurable, {
});
return $.silvan.configurable;
});
How can I initialize this file? Should I load it via requirejs-config? The map function is only for overriding right?
Is it possible to only modify this line? It's called from this function:
_fillSelect: function (element) {}