Skip to content

Commit d58d492

Browse files
update api.factory : tabDisplay should be
inline-flex
1 parent 58f12fb commit d58d492

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/api.factory.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* @param {Object} options
44
* @param {HTMLElement} options.containerElement - the first ancestor of the Tablist element which has a hidden overflow
55
* @param {HTMLElement} options.buttonElement - should be next sibling element of the Tablist element
6-
* @param {String} [options.tabDisplay="flex"] - default value is "inline-flex". would be display of li tag
7-
* @param {String} [options.containerDisplay="flex"] - default value is "inline-flex". would be display of containerElement
6+
* @param {String} [options.tabDisplay="inline-flex"] - default value is "inline-flex". would be display of li tag
7+
* @param {String} [options.containerDisplay="flex"] - default value is "flex". would be display of containerElement
88
*/
99
export const Api = function (options) {
1010
const arg = arguments;
@@ -20,14 +20,15 @@ Api.prototype = {
2020
_setOptions: function (options) {
2121
this._options = Object.assign(
2222
{},
23-
{containerDisplay: 'flex', tabDisplay: 'flex', buttonElement: null, containerElement: null},
23+
{containerDisplay: 'flex', tabDisplay: 'inline-flex', buttonElement: null, containerElement: null},
2424
options,
2525
);
2626
},
2727
_setEls: function () {
2828
this._tablistEl = this._options.buttonElement.previousElementSibling;
2929
this._tablistEl.style.overflow = 'visible';
3030
this._options.containerElement.style.overflow = 'hidden';
31+
this._options.containerElement.style.whiteSpace = 'nowrap';
3132
return this;
3233
},
3334
_showBtn: function () {

0 commit comments

Comments
 (0)